my $button = $popup->Button( -text => 'Kill', -command => [sub{`kill $sub_pid 2>&1` && warn "Can't kill subprocess: $sub_pid\n"}],-background=>'slate grey'); $button->pack;