use Cwd qw(abs_path); use Path::Class; my $THIS_DIR = file(abs_path(__FILE__))->dir; print $THIS_DIR,"\n";