Skip to content

Instantly share code, notes, and snippets.

@FROGGS

FROGGS/almost.p6 Secret

Created February 1, 2014 11:43
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 FROGGS/d1d98e35272fa1ae0fb9 to your computer and use it in GitHub Desktop.
Save FROGGS/d1d98e35272fa1ae0fb9 to your computer and use it in GitHub Desktop.
$ perl -E 'open(FH, "| wc"); print(FH "hello world"); close(FH);'
0 2 11
$ perl6-p -e 'my $fh = "wc".IO.open(:p, :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".IO.open(:p, :w); $fh.print("hello world"); $fh.close;'
0 2 11
$ perl6-m -e 'my $fh = "/usr/bin/wc".IO.open(:p, :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".IO.open(:p, :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