Try:
LABEL1: foreach my $a (@b) { if (...) { next LABEL1; } do_something(); if (...) { next LABEL1; } do_something_else(); if (...) { next LABEL1; } do_something_again(); }continue{ clean_up(); }
BTW, you can't avoid goto's. The best you can do is to cleverly disguise them.
In reply to Re: Avoiding goto
by shawnhcorey
in thread Avoiding goto
by elTriberium
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |