sub change_ops { my @ops = @_; my @newoptions = map { ++$. } ( 0 .. 3 ); my $callback = $ops[0]->cget (-command); $ops[0]->configure( -command => undef ); $ops[0]->configure( -options => \@newoptions ); $ops[0]->configure( -command => $callback ); }