Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^6: perldelta unclear on 'given's fate

by Bloodnok (Vicar)
on Jan 06, 2014 at 14:18 UTC ( #1069523=note: print w/ replies, xml ) Need Help??


in reply to Re^5: perldelta unclear on 'given's fate
in thread perldelta unclear on 'given's fate

Hmmm LanX, not unlike the construct I found when and have used ever since, I was looking for an alternative to the Switch modules available at the time - viz...

for ($var){ SWITCH: { /abc/ && do { print "abc"} # falls through /def/ && do { print "def" ; last SWITCH } /xyz/ && do { print "xyz" ; last SWITCH } print "default"; }; . . }
A construct I much prefer (for readability if nothing else) to what sometimes appear to extend to seemingly interminable if-elif-else constructs.

A user level that continues to overstate my experience :-))


Comment on Re^6: perldelta unclear on 'given's fate
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2015-07-30 06:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls