Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Best option for "switch/case" functionality?

by TheDamian (Priest)
on Jun 27, 2016 at 11:33 UTC ( #1166654=note: print w/replies, xml ) Need Help??


in reply to Best option for "switch/case" functionality?

Grab the experimental.pm module from CPAN (or you may already have it if you have a recent version of Perl installed).

Then, at the top of each file add:

use experimental 'switch';

Then continue to use given/when under every version of Perl that supports it...without annoying warnings or meta-warnings.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2020-06-02 06:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (13 votes). Check out past polls.

    Notices?