Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Avoiding goto

by duff (Parson)
on Jun 11, 2010 at 00:04 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://844158]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-04-19 11:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found