in reply to knowing the current directory

On POSIX platforms you can use POSIX.pm
use POSIX qw(getcwd); my $curdir = getcwd();

--
Ilya Martynov (http://martynov.org/)