Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

3 Answers 3

up vote 5 down vote accepted

perldoc perlvar

$^V contains the version.

perl -le 'print $^V'

share|improve this answer
1  
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

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.