in reply to Noob question

I'm not sure what your problem is, but you can use Cwd instead of pwd. It is more portable, and you can avoid the chomp:
use strict; use warnings; use Cwd qw(getcwd); print getcwd(), "\n";

See also: