use Cwd qw( realpath ); use File::Basename qw( dirname ); $script_dir_fqn = dirname(realpath($0));