in reply to Re: Getting path info in a mixed UNIX / NT environment
in thread Getting path info in a mixed UNIX / NT environment

Your idea will probably work fine. Assuming that the environment variable 'SOME_DRIVE' contains something like 'J:', you might also consider something like this:

$path = '/tmp/some/path'; $path = $ENV{SOME_DRIVE} . $path if $^O eq 'MSWin32'; # rest of code

Replies are listed 'Best First'.
Re: Re: Re: Getting path info in a mixed UNIX / NT environment
by el-moe (Scribe) on Dec 08, 2000 at 04:54 UTC
    I thought of that also. Is that more stable? If so I will use it.

    Prost,
    Moe

      It's not really a case of stability--they're both equally "stable". I find the if $^O = 'MSWin32' bit somewhat easier to maintain, though. When you go back in 6 months to look at this code, you'll more easily be able to figure out why you're trying to modify $path.