# Pastebin BU1txtpN sub panexec(Str() :$content, :$defaults, :@filters) is export { my @cmd = ; @cmd.append: ['--defaults', $defaults] if $defaults; if @filters { for @filters { @cmd.append: ['--filter', $_]; } } my $cmd = Proc::Async.new(:w, |@cmd); my $document = $cmd.stdout(:bin); $cmd.start; $cmd.print: $content; $cmd.close-stdin; return $document; }