To know more about Jews in India read wikipedia. The synagogue in cochin is popularly known as the paradesi synagogue and was built in 1568 by the descendants of Spanish, dutch and European jews. Various conservation efforts are in place for the synagogue.
Monday, April 21, 2008
Simple PERL counter
A simple PERL counter that counts the number of times a page is loaded. The script reads the number stored in "counter.txt" and increments it by one and displays the same. The incremented value is then stored in "counter.txt".
#!/usr/bin/perl
print "Content-type:text/html\n\n";
open (MYFILE, 'counter.txt');
chomp($count=);
close (MYFILE);
$count++;
print $count;
open (MYFILE, '>counter.txt');
print MYFILE "$count\n";
close (MYFILE);
A simple script to demonstrate reading from and writing to a file using PERL.
#!/usr/bin/perl
print "Content-type:text/html\n\n";
open (MYFILE, 'counter.txt');
chomp($count=
close (MYFILE);
$count++;
print $count;
open (MYFILE, '>counter.txt');
print MYFILE "$count\n";
close (MYFILE);
A simple script to demonstrate reading from and writing to a file using PERL.
Sunday, April 20, 2008
Saturday, April 19, 2008
Monday, April 14, 2008
The wonderful world of server side programming
Server side programming is wonderful as it provides access to lot of resources that client side scripts cant dream of...Database access, files to read and write to, mail programs and other applications on the server...
But Server side scripts are notorious for there slow speed of execution also.So its always a combination of both that triumphs.. Here is a imple perl script to print hello world... and since its a serebvr side script.. after printing "Hello world" it realises that it has entered the world wide web and prints "Hello web" :)
#!/usr/bin/perl
print "Content-type:text/html\n\n";
$first="Hello World";#scalar variable
print $first;
print "<br >";#line break
substr($first,7,10)="eb";#realisation
print $first;
But Server side scripts are notorious for there slow speed of execution also.So its always a combination of both that triumphs.. Here is a imple perl script to print hello world... and since its a serebvr side script.. after printing "Hello world" it realises that it has entered the world wide web and prints "Hello web" :)
#!/usr/bin/perl
print "Content-type:text/html\n\n";
$first="Hello World";#scalar variable
print $first;
print "<br >";#line break
substr($first,7,10)="eb";#realisation
print $first;
Friday, April 11, 2008
Passing values between Javascript and Vbscript
Very few applications are using Vbscript, but lot of old code exsists that use Vbscript. So its not very difficult to run into a situation where values have to be passed from one to the other. First i was thinking of using a hidden text box to pass values between the two... but its much easier. You can call variables from both, meaning variables are not specific to the scripting langauge as both are client side scripting langauges.
See the following code:
<html>
<body>
<script>
jvalue=confirm('Pass a value to Javascript');
</script>
<script type="text/vbscript">
document.write(lcase(jvalue))
<!--javascript variable used in Vbscript function -->
vvalue=ucase("vbscript here")
</script>
<script>
alert(vvalue)
</script>
<!--Vbscript variable used in Javascript function -->
<input type='hidden' name='passval'>
<!--no need of hidden text box-->
</body>
</html>
This example shows how one can use variables from javascript in vbscript and also vice-versa.
The situation is very different when values are to be passed between a client side script and a server side script.
See the following code:
<html>
<body>
<script>
jvalue=confirm('Pass a value to Javascript');
</script>
<script type="text/vbscript">
document.write(lcase(jvalue))
<!--javascript variable used in Vbscript function -->
vvalue=ucase("vbscript here")
</script>
<script>
alert(vvalue)
</script>
<!--Vbscript variable used in Javascript function -->
<input type='hidden' name='passval'>
<!--no need of hidden text box-->
</body>
</html>
This example shows how one can use variables from javascript in vbscript and also vice-versa.
The situation is very different when values are to be passed between a client side script and a server side script.
Subscribe to:
Posts (Atom)