# New Ticket Created by Vytautas D
# Please include the string: [perl #126998]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=126998 >
Following script throws error ( "Aborted (core dumped)" ) when $id ==
1007. This is because $p.err is really never closed. however, what I
find intriguing is if I remove "my $output = $p.err.slurp-rest;" line
it works fine. None the less, error message should be improved.
use v6;
my $id = 0;
recursion();
sub recursion()
{
say ++$id;
my $p = run('false', :out, :err );
my $output = $p.err.slurp-rest;
try {
$p.out.close;
$p.err.close;
CATCH { default {} }
}
if ($id < 1010) {
recursion();
}
}
$ perl6 --version
This is Rakudo version 2015.11-708-g76c447b built on MoarVM version
2015.11-113-gbd56e2e implementing Perl 6.b.