require "pwd.pl";

&initpwd;
...
&chdir($newdir);
