use Cwd; # a core module ;-) my $cwd = getcwd;