Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: cross platform perl - how to modify $path

by THRAK (Monk)
on Aug 21, 2001 at 00:37 UTC ( [id://106359]=note: print w/replies, xml ) Need Help??


in reply to cross platform perl - how to modify $path

Determine which OS you are on using $^O within an if/else and set the separator character.
$separator = '/'; $separator = '\\' if ($^O =~ /Win/);


-THRAK
www.polarlava.com

Replies are listed 'Best First'.
Re: Re: cross platform perl - how to modify $path
by data64 (Chaplain) on Aug 21, 2001 at 01:02 UTC
    I actually thought about this, but I was not sure if the separator char is different for the different unix shells, ie: between csh and sh. I don't even want to think about zsh and other less common ones.

    data
      It's not; the seperator between directories is / on all unix systems. The shell is irrelevant.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-25 06:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found