Re: binmode and <>



jl_post@xxxxxxxxxxx schreef:

Running the following perl one-liner:

perl -ne "BEGIN{binmode(ARGV)} print length" blah.txt

prints "1", meaning that it didn't properly read the two bytes as two
separate characters, since the binmode(ARGV) didn't "take."

With "warnings" activated:

$ perl -wne "BEGIN{binmode ARGV} 1" < /dev/null
binmode() on unopened filehandle ARGV at -e line 1.

--
Affijn, Ruud

"Gewoon is een tijger."
.