Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Conditionally executing different code based on Perl Version

by Eliya (Vicar)
on Feb 21, 2012 at 21:50 UTC ( #955397=note: print w/ replies, xml ) Need Help??


in reply to Conditionally executing different code based on Perl Version

You can check the special variable $], e.g.

use if $] >= 5.014, re => '/d';

See also the module if.

(Yes, the docs say "deprecated in Perl 5.6", but it still works more than a decade later :)


Comment on Re: Conditionally executing different code based on Perl Version
Select or Download Code
Re^2: Conditionally executing different code based on Perl Version
by ikegami (Pope) on Feb 21, 2012 at 22:55 UTC

    I loaded perlvar.pod into my editor to submit a patch to remove the deprecated notice, but it was already gone! 5.16 won't have that deprecated notice.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://955397]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2015-07-05 06:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls