Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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
Replies are listed 'Best First'.
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 perusing the Monastery: (10)
As of 2015-07-31 04:05 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 (274 votes), past polls