in reply to Executing a shell script with progress indicator

This is easy using threads::async

#! perl -slw use strict; use threads qw[ async ]; use threads::shared; $|=1; my $done:shared = 0; my $rc :shared = 0; async { system @ARGV; $rc = $? >> 8; $done = 1; }; my $n=0; printf "%s\b", substr '|/-\ ', ($n = ++$n % 4), 1 while select( '','','',0.25) and not $done; print "@ARGV : rc = $rc"; __END__ P:\test>499224 perl -e"sleep 10; exit 123" perl -esleep 10; exit 123 : rc = 123

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.