Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Avoiding goto

by duff (Vicar)
on Jun 11, 2010 at 00:04 UTC ( #844158=note: print w/replies, xml ) Need Help??


in reply to Avoiding goto

I might write it like this:
for my $a (@b) { if (...) { next } do_something(); if (...) { next } do_something(); if (...) { next } do_something(); } continue { perform_cleanup(); }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://844158]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2017-02-20 19:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (302 votes). Check out past polls.