in reply to perl & UNC paths

Double your backslashes. If perl is able to work with UNC paths, that should fix it. Because now, your "UNC path" isn't an UNC path.

If it can't... Well, map the drive or directory to a letter.

Replies are listed 'Best First'.
Re: Re: perl & UNC paths
by nimdokk (Vicar) on May 06, 2004 at 15:59 UTC
    you can also set it up as follows:

    use File::Spec; my $dir=File::Spec->catdir('//server','share','folder','subfolder');

    Note that the \\ has been reversed from normal, this does work, we do this all the time with our scripts on Windows. Also, you can do the following:

    chdir $dir or die "Cannot change to $dir. $!";

    We do this quite frequently with our Windows Perl scripts. You cannot do this from the commandline (if I remember correctly).