Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Conditionally executing different code based on Perl Version

by tobyink (Abbot)
on Feb 21, 2012 at 22:05 UTC ( #955400=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ($] >= 5.014) {
      ...
    ...
    else {
      ...
    }
    
  2. or download this
    BEGIN {
      *NEW_PERL = ($] >= 5.014) ? sub(){1} : sub(){0};
    }
    ...
    else {
      ...
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://955400]
help
Chatterbox?
[LanX]: machiato!
shmem fills a glas with sambuca, drops 3 beans of coffee into it, lights the stuff and hands it to erix
[Your Mother]: Liquore Strega. :P
[shmem]: s/beans of coffee/enterprise beans/ :-P
[erix]: Take your bottles -- you're all invited! :)

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2017-03-28 12:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (330 votes). Check out past polls.