[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-AnyPerl] solution for . .. /



On Tue, Jun 06, 2000 at 04:44:10PM -0700, Mr. Anderson wrote:
> i am developing and testing my scripts with macperl
> before i upload them to a unix server
> 
> when i normally refer to a path or filename, for example
> "content/test.file" or "../../html/wow.html" the macperl
> seems to not be compatible with this method of refering.
> 
> example:
> 
> open FILEOUT, ">> content/test.file"
> 
> creates a file in the current directory that is actually
> named "content/test.file" and in other words does not put
> it in the content directory.
> 
> do you know what the solution is?

The Mac uses : as the directory separator in paths, not /.  You need to
write your code so that it is platform-independent.  You might be
interested in the File::Spec module, which handles paths on various
platforms.

Ronald

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-anyperl-request@macperl.org