Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 examining the Monastery: (12)
As of 2014-07-10 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (207 votes), past polls