in reply to How to change Current Shell's Pwd ?

When you use backticks or the system() function, you're starting up a command shell for your operating system, changing the current directory of the command shell, then exiting the command shell and returning to perl. Perl's notion of the current directory doesn't change.

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