in reply to execute command as well as prompt user

Here's one way (BTW. Using backticks and ignoring the output doesn't make a lot of sense):

use threads; use threads::shared; my % commands = ( CMD1 => process 1, CMD2 => process 2, CMD3 => process 3, ); foreach my $cmd(keys %commands) { my $done :shared = 0; async { `$commands{$cmd}`; if($?) { print ¨ Error: $commands{$cmd}\n¨; } $done = 1; }->detach; until( $done ) { for( 1 .. 60 ) { sleep 1; last if $done; } print ¨Still executing: $command{$cmd}\n¨ } }

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy