in reply to cd?

This is a question in perlfaq8 (but it's not immediately obvious, so this is not a lecture :). If chdir doesn't help, you can replace the running process with judicious use of exec.