Posts Tagged ‘perl’

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>”;