From: John Gaughan (jgaughan at domain irish-times.com)
Date: Fri 12 May 2000 - 12:36:49 IST
> -----Original Message-----
> From: ilug-admin at domain linux.ie [mailto:ilug-admin at domain linux.ie]On Behalf Of Peter
> McEvoy
> Sent: 12 May 2000 12:07
> To: ilug at domain linux.ie
> Subject: [ILUG] Path separator in Perl
>
> Anyone know of a platform independant way of figuring out what the path
> separator is in Perl (/ vs \)? (I'm developing on NT for use on a UNIX
> machine, and I'm doing a lot of stuuf with path manipulation/searching).
Hi Peter,
you should be able to use '/' as the path separator under NT, which is
useful since '\' would be interpreted as an escape in some circumstances
(like double-quoted strings). It would probably make things a lot simpler
to change any paths to use '/' instead of '\'.
There's an article [1] on writing portable Perl on perl.com. You might find
the section on DOS and its derivatives [2] useful.
John.
[1] http://www.perl.com/pub/doc/manual/html/pod/perlport.html
[2]
http://www.perl.com/pub/doc/manual/html/pod/perlport.html#DOS_and_Derivative
s
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:06:07 GMT