http://www.perlmonks.org?node_id=722426


in reply to Traversing SubDir and Execute Unix Command

to change the current directory do as the following example:

use Cwd; chdir("C:\\Perl") || die "Error changing the directory ($!)";
my $cwd =getdcwd();

Now cwd holds the full path to the working directory. Hope this helps...