Skip to content

Instantly share code, notes, and snippets.

@jnthn

jnthn/a.p6 Secret

Created June 29, 2017 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnthn/0add6b73021c02010ae5aacc95d62d50 to your computer and use it in GitHub Desktop.
Save jnthn/0add6b73021c02010ae5aacc95d62d50 to your computer and use it in GitHub Desktop.
for 1..100 {
my $proc = Proc::Async.new('cat', '-', :w);
my $total = 0;
$proc.stdout(:bin).tap: { $total += .bytes };
my $exit = $proc.start;
await $proc.write($input);
$proc.close-stdin;
await $exit;
ok $total == $input.bytes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment