How to find out the perl version

Posted: February 18, 2008 in How To
Tags: ,

Perl is acronym for Practical Extraction and Report Language. It is a general-purpose programming language invented in 1987 by Larry Wall. Originally developed for text manipulation. Perl has become extremely popular and is now used for a wide range of tasks, including web development and interface design.

If you have access to a shell prompt(Solaris, Unix/Linux), type following command to find out perl version:

perl -v

Altrernatively, you can use the following perl script to achieve the same through web:

$command=`perl -v`;
$title = “Perl Version”;

print “Content-type: text/html\\n\\n”;
print “<html><head><title>$title</title></head><body>”;

print “<h1>$title</h1>\n”;
print $command;

print “</body></html>”;


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s