in reply to Re^4: Doing "it" only once
in thread Doing "it" only once
my %things = (foo => sub {print "skipping foo\n"; next}, bar => sub {handle_bar($_); next}, ); for (@some_array) { (delete $things{$_})->() if exists $things{$_}; handle_rest($_); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Doing "it" only once
by Limbic~Region (Chancellor) on Sep 22, 2005 at 12:23 UTC |