Created
September 14, 2015 09:41
-
-
Save dinkypumpkin/2e26225e314f0cef7818 to your computer and use it in GitHub Desktop.
PerlIO binary open check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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