in reply to cd?

You can chdir($somePath) from within a script, but the effect is temporary. There is no easy way to side-effect the cd'ness of the environment that the script was invoked from.