in reply to How to change Current Shell's Pwd ?
If you want the present working directory that perl uses to change, you need to use the chdir() function.
In your example, you'ld want something like:
$status = chdir("/home/test"); # next, check status to see if we successfuly changed directory. die("Can't change to directory /home/test:$!") unless($status);
You might want to double check the documentation to see what the return value of chdir() is like, but I think that's right: then again, I'm typing from memory at 2:00 am. ;-)
Hope that helps,
--
Ytrew
|
|---|