use Cwd qw/getcwd/; # Current working directory my $cwd = getcwd();