http://www.perlmonks.org?node_id=48830


in reply to How do I find what directory the perl script is running from?

I use:

use FindBin qw($Bin);

$Bin is set to the value of the script's path.