Take the 2-minute tour ×

How do I check which version of Perl is Apache2 using? I have a few versions of Perl installed and I want to make sure.

share|improve this question
add comment

3 Answers

up vote 5 down vote accepted

perldoc perlvar

$^V contains the version.

perl -le 'print $^V'

share|improve this answer
On the command line, simply ask 'perl -v' –  Yaakov Belch Nov 3 '09 at 12:35
I used the command line only to show sample usage. The contents of $^V is the most trustworthy way of knowing what you're really working with. –  Zimmy-DUB-Zongy-Zong-DUBBY Jan 28 '10 at 20:28
add comment

Shouldn't this depend on what your actual scripts have for the shebang line? perl -V I believe would report what perl version the 'perl' command is set up for, but it depends on which one you specify in your scripts.

Are you using mod_perl? .cgi files? How exactly are you using the perl files in Apache?

share|improve this answer
add comment

There should be an entry in the Server header sent by your Apache installation to all clients. You can easily check this with a netcat session or an online tool.

For example, our server returns

Server: Apache/2.2.9 (Debian) ... mod_perl/2.0.4 Perl/v5.10.0

(This may require mod_perl, I'm not certain.)

share|improve this answer
add comment

Your Answer


