use Cwd qw(abs_path); use File::Basename qw(dirname); my $dir_parent = abs_path(dirname(__FILE__) . '/../');