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