Neat hack. Note that the grep will always iterate all of @options though. Also, you can remove the dependency on do_something()'s return value with a construct like
exists $hash{ $_ } and ( do_something( $_ ), 1 )
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: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |