In the same vein, but along a different angle:
foreach my $i ( 0 .. $#options, 'fail' ) { if( $i eq 'fail' ) { log_failure(); last; } if( exists $hash{ $options[ $i ] } ) { do_something( $options[ $i ] ); last; } }
Makeshifts last the longest.
In reply to Re^2: improve ugly flow control
by Aristotle
in thread improve ugly flow control
by perrin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |