If you just want the current directory, use core module Cwd.
use Cwd; print cwd; [download]
TGI says moo
In reply to Re: use of <STDOUT> by TGI in thread use of <STDOUT> by PerlZealot