The obvious answer is, of course, a labelled block.
TRY: { foreach my $try ( @options ) { next unless exists $hash{ $try }; do_something( $try ); last TRY; } log_failure(); }
Makeshifts last the longest.
In reply to Re: improve ugly flow control
by Aristotle
in thread improve ugly flow control
by perrin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |