Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: for loop ?

by cdarke (Prior)
on Aug 12, 2011 at 08:24 UTC ( [id://919995]=note: print w/replies, xml ) Need Help??


in reply to Re^2: for loop ?
in thread for loop ?

So far as I know we still have if ... elsif ... else. Personally I would not even think of using a for loop in this way, which means I learnt something. I'm all for trying different code tricks, some are dire and should be destroyed at birth, but some bring enlightenment.
I'm not sure that the code is any harder to read than some of the attempts at switch/case using LABELS (as in the Perl Cookbook). I agree with your sentiment though, and grateful that we have been blessed with given/when.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-19 02:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found