Skip to content

Instantly share code, notes, and snippets.

@dinkypumpkin
Created September 14, 2015 09:41
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 dinkypumpkin/2e26225e314f0cef7818 to your computer and use it in GitHub Desktop.
Save dinkypumpkin/2e26225e314f0cef7818 to your computer and use it in GitHub Desktop.
PerlIO binary open check
#!/bin/bash
perl -MPerlIO -e 'open($fh, ">", "/dev/null"); print "default = ", join(", ", PerlIO::get_layers($fh)), "\n";'
perl -MPerlIO -e 'open($fh, ">:raw", "/dev/null"); print ":raw = ", join(", ", PerlIO::get_layers($fh)), "\n";'
perl -MPerlIO -e 'open($fh, ">", "/dev/null"); binmode $fh; print "binmode = ", join(", ", PerlIO::get_layers($fh)), "\n";'
perl -V
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment