in reply to knowing the current directory
Use Cwd; my $current_dir = cwd(); print "The current working directory is $current_dir\n"; [download]
HTH