>From inside a program I'd like to send some input to the stdin of external
program and read back the stdout.
The example in https://docs.perl6.org/language/ipc under proc comes close
to what I want:
my $echo = run 'echo', 'Hello, world', :out;
my $cat = run 'cat', '-n', :in($echo.out), :out;
That works, however what I want however is a single external process, sort
my $input = q:to/EOS/;
line of text
my $cat = run 'cat', '-n', :in($input.print), :out;
my $output = $cat.out.get;
But that is not correct. I seem to be missing something.