in reply to perl and unc paths
system('pushd \\\\comp1\\newfolder');
But that's not going to do what you want. system will create a new shell for pushd to run in, and pushd will only affect that shell. (It will also affect any child that shall will later spawn, but it spawns none as is.)
Use chdir to change the working directory of the Perl script (and any children it later spawns). The current directory will get automatically restored when the script ends. If that's too late, use Cwd to find out which directory is the current working directory, and use chdir to restore it when you wish to do so.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl and unc paths
by Anonymous Monk on Aug 22, 2016 at 18:29 UTC | |
by soonix (Chancellor) on Aug 27, 2016 at 12:11 UTC | |
by ikegami (Patriarch) on Aug 29, 2016 at 15:19 UTC | |
by Anonymous Monk on Aug 22, 2016 at 18:31 UTC |