use Cwd; #### $thisdir = cwd(); #### $thisdir = `pwd`; #### $pwd = $ENV{'SCRIPT_FILENAME'};