Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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

by TheDamian (Vicar)
on Jun 27, 2016 at 11:33 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1166654]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-16 04:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found