> -----Original Message-----
> From: ilug-admin at linux.ie [mailto:ilug-admin at linux.ie]On Behalf Of Peter
> McEvoy
> Sent: 12 May 2000 12:07
> To: ilug at 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
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!