in reply to Platform Differences

Newlines and chomp is not a big problem, since normally (non-binary) files automatically normalize the newline character to a single "\n" anyway. For most scripts, the difference is invisible.

And even among a single platform, is a newline character "\n", "\N{LINE SEPARATOR}", or "\N{PARAGRAPH SEPARATOR}"? (It's ironic that the Unicode documentation for the latter two use the term "unambiguously").

The ActiveState documentation includes sections on what's different re the built-in functions and semantics.

Windows has COM/OLE, and the Registry. Porting programs to *nix will have to overcome this lack and approach problems in different ways (e.g. there is a portable Word document reader; is there a Perl interface for it?).

Re case sensitivity: a.txt and A.txt are allowed in the same directory on NTFS (and possibly network-mounted file systems). But you'll have problems referring to them without using tools compiled with the POSIX subsystem, or special flags passed to CreateFile (the low-level open API) which Perl doesn't do.

Paths: On Windows, it's a backslash. But slash is taken as an alias most of the time. Perl programs commonly use a slash and ignore this. But what if you have a filename with a backslash in it? Likewise, on a Mac, a file named "notes 12/23/99" is legal--what's Perl going to do with that?

Special characters: In Win32, only backslash, slash, and colon are special. No big deal about the rest, just like in *nix.

Here's a new one: file permissions models differ.

Details of globbing varies.

In *nix, globbing is done by the shell. In Windows, the command tail is passed in as a single string. In Mac, what arguments?

Win32 and Be have multiple data streams in a file. Mac has resource forks. *nix has nada. Beware copying files by simply rewriting the contents!

*nix can unlink an open file. Win32 can't (not sure if it's inherent or has to do with the flags it uses).

*nix uses "magic number" at beginning of a file and #! to associate files; Mac has metadata for that; Windows uses extensions, metadata, and/or general content pattern matching.

Symbolic and hard links.

Single-rooted file system vs. a forest of individual volumes.

deamons vs. services (what's on a Mac?)

Forking as an OS primitive vs. Process model.

—John