Thanks Timo, A Proc::Async example, after reading the doco. Agree, that't better, even for the simple case :-) - David
my $proc = Proc::Async.new('sh', '-c', 'for x in `seq 1 10000` ; do echo "o$x"; echo "e$x" 1>&2; done'); # subscribe to new output from out and err handles: $proc.stdout.tap(-> $v { print "o:$v" }, quit => { say 'caught exception ' ~ .^name }); $proc.stderr.tap(-> $v { print "e:$v" }); say "Starting..."; my $promise = $proc.start; # wait for the external program to terminate await $promise; say "Done."; On Fri, Jul 28, 2017 at 12:42 PM, Timo Paulssen <t...@wakelift.de> wrote: > We have Proc::Async which removes the need for the select call itself >