PG> Are you factually stating there are no systems in use which
PG> are binmode sensitive?
Exactly the opposite, actually; there are many systems in use which
*are* sensitive to binmode. Including some that formerly were not.
PG> I am very skeptical about your statements. You are informing
PG> readers there are no longer any systems, no longer any reasons
PG> to be concerned about binmode being used, or not used.
Er, no. I'm informing readers of exactly the opposite - that when
they expect binary data, they should use the binmode statement.
You're the one advising people to omit them.
PG> Your statements are based upon a premise all systems,
PG> literally all systems run the most recent operating systems
PG> and most recent versions of Perl and based upon a premise
PG> there are no systems found which are binmode sensitive.
No, it's based on the *fact*, documented in the perldocs, that with
various encodings and line disciplines, it's relevant to indicate to
the system whether you expect the file to be binary or text.
Given that I'm advising people to follow the directions in the
perldocs -- namely, to use binmode when you expect binary data, and
not to use it otherwise -- I'm not sure why you're tilting at this
particular windmill. All the world can no longer be safely assumed to
run in ASCII, and input and output layers can make binmode meaningful
even on Unixlikes.
My premise is that when you expect to deal with raw binary data, you
use binmode, as documented in the perldocs. When you expect to deal
with text, you do not. On systems where this does not matter, the
binmode statement is a no-op; on systems where this does matter, the
binmode statement is meaningful. The use of different encodings and
input and output layers means that binmode is meaningful even on
systems where it formerly was not.
What it boils down to is this.
Some systems do not distinguish between text and binary files. On
these systems, using binmode does not change anything.
Other systems *do* distinguish between text and binary files. On
these systems, not using binmode causes problems.
And there are many systems which *formerly* did not distinguish
between text and binary files, but which are now. In particular, you
will get different results if you treat files encoded in UTF-8 or
UTF-16 as binary files than if you treat them as text files.
None of this is based on assuming that the whole world has ceased to
distinguish between binary and text files. On the contrary, it's
based on the evidence that text encodings are not all ASCII anymore.
It's also not based on assuming that the whole world is running 5.8.8.
On the contrary, it's based on future-proofing the script. Sooner or
later, that script is going to be run in a different environment --
possibly because a sysadmin upgraded to 5.8.8 without sending you the
memo - and it's better to be clear about what you intend and expect,
or it is likely to break.
Charlton