Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 lurking in the Monastery: (3)
As of 2025-05-22 06:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.