if($schritt == 2) { $button->destroy(); my $new_btn = $mw->Button(...)->pack(); }