in reply to Iteration condition...
my $action = \&initial_action; for (@input){ if (/$Start/){ $action = \&do_this; } elsif (/$Finish/){ $action = \&do_that; } # perform your action $action->(); }
But it might depend on your idea of "simple" if that's really more simple.
|
|---|