my $_pwd = getcwd(); print "$_pwd\n"; # shows c:/perl/training : directory were I start from. chdir("c:\\public") or print STDERR "\n\tERROR in chdir: $!\n"; $_pwd = getcwd(); print "$_pwd\n"; # shows c:/perl/public: directory have been changed