Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Perl appending \ or / based on windows or linux

by jonadab (Parson)
on Oct 07, 2014 at 11:00 UTC ( #1103074=note: print w/replies, xml ) Need Help??


in reply to Re: Perl appending \ or / based on windows or linux
in thread Perl appending \ or / based on windows or linux

I second this.

use File::Spec::Functions; my $path = catfile("xyzz", "qwen", "defs", "asd"); # $path is now "xyzz/qwen/defs/asd" on most systems, # but on Windows it'll have backslashes instead # and I think on old MacOS Classic systems it would # have colons or something. Don't ask about VMS.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1103074]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2019-12-14 17:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?