At 8:21 +0100 1999.09.15, Fergus McMenemie wrote: >>At 11:06 +0100 1999.09.14, Fergus McMenemie wrote: >>>P.S. one of the really nice things about perl on NT is how transparently it >>>handles the difference between the directory seperators used on UNIX and >>>DOS. A pitty MacPerl cant do something similar. >> >All the comments are quite true and valid. However when I'm doing cross >platform development filenames such as file "Expenses 7/99" are not an >issue. That is fine for you. But for many people, MacPerl is a Macintosh scripting language, and they don't want to be limited to files and paths that would only work on Unix and DOS and Mac OS. The needs of the many outweigh the needs of the few. Sorry. >I really like working on the Mac and its a pitty I have to go so far >out of may way to make my scripts run on the Mac. Well, a Mac user could say the same thing about it being a pity that Unix has such a lame path separator. Why is one more correct than the other? Yes, Unix was there first, but it certainly wasn't a standard by any means when the Mac was introduced. If we could go back in time and agree on one newline and one path specification style, life would be easier. We can't. So we deal with it. That said, you should check out the Mac::FileSpec::Unixish module. It allows you to use a Unixish filespec and translate it to a Macish filespec: use Mac::FileSpec::Unixish; $foo = "../analyses/ziz.txt"; open(OUT, '>' . nativize($foo) ) || die "Couldn't open $foo: $!"; nativize() will leave the path unchanged on Windows and Unix, but change it into a Mac path in Mac OS. The module is on CPAN and is included in the cpan-mac distribution (which I recommend everyone who works with CPAN and MacPerl should install). http://search.cpan.org/search?dist=Mac-FileSpec-Unixish http://pudge.net/macperl/ -- Chris Nandor mailto:pudge@pobox.com http://pudge.net/ %PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6']) ===== Want to unsubscribe from this list? ===== Send mail with body "unsubscribe" to macperl-request@macperl.org