Perl on Windows
Perl is one of several program language available around the world, some people say that Perl is more difficult than PHP, I'll say.
Here, we are not talking about why Perl, why not PHP, why on Windows, bla..bla..bla... I just want to share with somebody who want to know how to setup Perl on Windows.
Here are the easy way to install Perl.
1. Go to XAMPP. Find the latest version or 1.7.3, and Perl is integrated already on it.
2. Setup your XAMPP.
3. When it's done. Go to http://localhost and click perlinfo() and you will see the result as the following.
When you done with those three steps, then go to the next steps.
Creating a simple perl script.
4. Go to folder XAMPP/HTDOCS.
5. Create a new folder 'perl'. Your script will be saved into that folder
6. Try this following script
#!D:\xampp\perl\bin\perl
# hello.pl
print "Content-type: text/html\n\n";
print <<"EOF";
<html>
<body>
<h1>Hello, world!</h1>
</body>
</html>
EOF
4. Save as "hello.pl"
5. Open your browser, and entry this URL http://localhost/perl/hello.pl

Please try another script.
#!D:\xampp\perl\bin\perl
print "content-type: text/html \n\n"; #HTTP HEADER
$string = "I am learning perl";
print "<b>Original String: </b> $string<br />";
print "</br>";
# Store sub string of $string, offset of 5
$substringoffset = substr($string, 5);
print "<b>Offset of 5:</b> $substringoffset<br />";
Good Luck !!
-
01/18/2012 - 14:25
I'm sure you’ve heard by now that SOPA is bad...
-
12/06/2011 - 13:52
Best Practices to Protect Yourself
1....
-
09/06/2011 - 17:23...
-
06/23/2011 - 13:47
The Drupal 7 code freeze triggered a lot of...
-
04/20/2011 - 00:42
Do you have a habit of starting projects, but...




