in reply to chdir not working
Also remember that your program can not effect the working directory of its parent. So if you are trying to run this from a shell prompt and are expecting the current directory of your shell to be changed after your script exits, that won't work.
user@host:/mytempdir> perl -e'use Cwd; chdir("/"); print getcwd() . "\ +n";' / user@host:/mytempdir>
In the example above you can see that the chdir did work, but after the script exits the cwd is back to what it was.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: chdir not working
by ikegami (Patriarch) on Oct 05, 2007 at 19:51 UTC |