Skip to content

Instantly share code, notes, and snippets.


FROGGS/almost.p6 Secret

Created Feb 1, 2014
What would you like to do?
$ perl -E 'open(FH, "| wc"); print(FH "hello world"); close(FH);'
0 2 11
$ perl6-p -e 'my $fh = "wc", :w); $fh.print("hello world"); $fh.close;'
/bin/sh: 1: /home/froggs/dev/rakudo/wc: not found
$ perl6-p -e 'my $fh = "/usr/bin/wc", :w); $fh.print("hello world"); $fh.close;'
0 2 11
$ perl6-m -e 'my $fh = "/usr/bin/wc", :w); $fh.print("hello world"); $fh.close;'
Invalid open mode: 104017744
in method open at src/gen/m-CORE.setting:13177
in method open at src/gen/m-CORE.setting:13167
in block at -e:1
$ perl6-j -e 'my $fh = "/usr/bin/wc", :w); $fh.print("hello world"); $fh.close;'
Unhandled file open mode 'wp'
in method open at gen/jvm/CORE.setting:13179
in method open at gen/jvm/CORE.setting:13169
in block at -e:1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment