?
Solved

Perl Version

Posted on 2003-03-15
4
Medium Priority
?
217 Views
Last Modified: 2011-09-20

Hello,

Is there a way that a Perl script can determine what version of Perl it is running under?  Without invoking a second instance of Perl of course.

Like a special variable or something?

Cheers,

muff
0
Comment
Question by:muff
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 20

Expert Comment

by:jmcg
ID: 8142718
$^V or $PERL_VERSION

See "perldoc -f require" as well.
0
 
LVL 48

Expert Comment

by:Tintin
ID: 8144115
As jmcq mentions, the common way is to use require, eg:

require 5.6.1;  # This script requires a minimum of Perl 5.6.1
0
 

Expert Comment

by:saraj
ID: 8146124
Use "Perl -v" to know the current installed Perl Version
0
 
LVL 1

Accepted Solution

by:
ericl1st earned 375 total points
ID: 8149360
print $];

That will tell you the perl version, as Perl stores the version in the variable: $]

Cheers!

Eric First
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question