Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by Bloodnok (Vicar)
on Jan 06, 2014 at 14:18 UTC ( [id://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 :-))

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-03-28 22:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found