but what if a file was created on a Windows machine, but this code was being run on a Mac?
It wouldn't matter which type of system was running the perl
I remember reading somewhere in this thread that \r and \n have reversed semantics on the Mac (vs. *nix, Windows).
Um, no, that statement hasn't been made on this thread.
My own experience has been that MS systems use
"\r\n", all .n.x systems use "\n" and (older) Mac systems
use "\r". Nobody uses "\n\r".
And now that MacOS-X is out with a unix foundation,
maybe the number of variants will reduce to just two instead