use File::Spec; my $project_dir = File::Spec->catdir( File::Spec->rel2abs(__FILE__), File::Spec->updir() );