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


in reply to Finding the current directory

use Cwd; my $cwd = cwd();