LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Path separator in Perl

[ILUG] Path separator in Perl

John Gaughan jgaughan at irish-times.com
Fri May 12 12:36:49 IST 2000


> -----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





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


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!
RSS Version
Powered by Dell