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

Re: Avoiding goto

by duff (Parson)
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 nobody stirs...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2018-01-23 18:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (252 votes). Check out past polls.

    Notices?