in reply to Re: improve ugly flow control
in thread improve ugly flow control
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 Section
Seekers of Perl Wisdom