in reply to Finding the current directory

use Cwd; my $cwd = cwd();