use Cwd; $dir = cwd; print $dir;