In Proc::Async§

See primary documentation in context for method bind-stderr

method bind-stderr(IO::Handle:D $handle)

Redirects STDERR of the target process to a handle (which must be opened). If STDERR is closed X::Proc::Async::BindOrUse will be thrown.

my $p = Proc::Async.new("ls""--foo":err);
my $h = "ls.err".IO.open(:w);
$p.bind-stderr($h);
$p.start;