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


in reply to Finding relative path to called script

try:
use FindBin qw($Bin);
$Bin is now your script's path.

Enjoy,
Mickey