in reply to chdir for another machine

Sounds like you're on a windows machine. I believe perl will support anything that the dos shell will support on filesystems. In other words, if you can't "cd" in dos to \\machine\folder, then perl can't chdir to it (which is the case here).

I would suggest mounting \\machine\folder1 or whatever on one of your drive letters (M:, N:, etc) and THEN chdir'ing in perl to that directory.

--
perl: code of the samurai

Replies are listed 'Best First'.
Re: Re: chdir for another machine
by John M. Dlugosz (Monsignor) on Nov 07, 2002 at 20:30 UTC
    I just tried it, and it works fine if I double-up the backslashes inside the quotes.

    Perl changed the current directory for the process. Then when doing a system('dir') the stupid CMD.EXE shell reports "'\\FOO\BAR' is an invalid current directory path. UNC paths are not supported. Defaulting to Windows directory.".

    —John

Re: Re: chdir for another machine
by John M. Dlugosz (Monsignor) on Nov 07, 2002 at 20:27 UTC
    What does the brain-dead COMMAND.COM or CMD.EXE shell have to do with it? 4DOS/4NT has always supported chdir'ing to network paths and UNC names, even though MS's stuff did not. The native change-directory function in the Windows API supports UNC names; if Perl passes through to that unmunged it should work.
Re: Re: chdir for another machine
by Zitoune (Beadle) on Nov 07, 2002 at 18:11 UTC
    k i taught to do this but it's the way i wanted to do it. I'll try another way. thanks anyways