my $changed = 0; sub show_choice { $changed = 0, return if $changed; print "got: ", shift, "\n" } sub change_ops { my $op = shift; my @newoptions = map { ++$. } ( 0 .. 3 ); $changed = 1; $op->configure( -options => \@newoptions ); }