my $run_all=$mwb_final->Button( -text => 'RunAll', -width => 100, -activebackground => 'blue', -background => 'green', -command => sub { $first_button->invoke(); $second_button->invoke(); #push @jobs, threads->create(sub {$first_button->invoke();}); #push @jobs, threads->create(sub {$second_button->invoke();}); #$_->join for @jobs; # Wait for everything to finish. })->pack();