Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 having an uproarious good time at the Monastery: (4)
As of 2019-10-23 04:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?