Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 wandering the Monastery: (3)
As of 2017-07-27 17:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (419 votes). Check out past polls.