And then there's the macosx adaptation of openBSD unix, where (in contrast to every other type of unix-based or unix-like OS I know of) case distinctions are ignored. I just tried this on my mac, and was quite saddened by the result:
I see that File::Spec has a "case_tolerant()" function, which (according to the man page) is supposed to return "a true or false value indicating, respectively, that alphabetic case is not or is significant when comparing file specifications."$ echo foobar > /tmp/junk $ cat /tmp/junk foobar $ cat /tmp/JUNK foobar $ echo hello > /tmp/JUNK $ cat /tmp/junk hello $ cat /tmp/JUNK hello
But having tried that just now on macosx, I find that it returns false (case is significant), despite the fact that case is demonstrably not significant for distinguishing paths on macosx. I think that's something that needs to be fixed in File::Spec.
(I'm still using the Perl 5.8.8 that shipped with macosx 10.5.8 -- maybe this was fixed in Perl 5.10?)
So to succeed in your cross-platform intentions, you yourself have to check the value of $^O -- if it's "darwin", you have to fold case; if it's "MSWin32", you have to fold case and slashes; anything else, you leave all characters as-is.
(updated to fix link to module page)
(updated to change "mswin" to "MSWin32", which is what File::Spec looks for)
In reply to Re: Unify windows filenames
by graff
in thread Unify windows filenames
by Sewi
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |