On Thu, 18 Feb 2016 09:51:34 -0800, ug...@cpan.org wrote:
> The assignment fix can be simplified further:
> $ perl6 -e 'my $p = shell("false", :out); |$p.out.close; say
> $p.exitcode'
> 1

Or even simpler:

    $ perl6 -e 'my $p = shell("false", :out); $p.out.close.exitcode.say'
    1

.close doesn't throw as some above suggested. It returns the Proc object and 
sunk Proc with non-zero exitcode throws.

Reply via email to