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

Your code as written won't work, for at least two reasons. One, unless you've defined one, there is no SOME_DRIVE environment variable. Two, you'll want to put double-quotes around that last bit:
my $path = "$DRIVE_LETTER/tmp/$some_file";

Depending on what your scripts do, though, you may not need to worry about what your current path is. And if you use relative paths, you shouldn't need to worry about drive letters whatsoever on Win2K.

Replies are listed 'Best First'.
(bbq) Re: Re: Getting path info in a mixed UNIX / NT environment
by BBQ (Curate) on Dec 08, 2000 at 12:57 UTC
    myocom is correct about the relative paths, but I'd go just a bit further and remind you that perl understands the root of the drive that it is being executed from. In other words, if you're installed in D:\Perl\bin\perl.exe, then / = D:\

    This is true for all Windows as far as I know...

    #!/home/bbq/bin/perl
    # Trust no1!