use Cwd 'abs_path'; my $szAbs = (abs_path $0); print "Abs path is $szAbs\n";