in reply to How to obtain current working directory

You mean you need only the directory where the script resides? Then File::Basename (standard module) will do the trick:
use File::Basename; my $script_dir = dirname($0);
Arjen