$temp = $ENV{'PATH_TRANSLATED'}; # get full path $temp =~ s|\\|/|g; # convert \ to / (necessary if win) $temp =~ s/\/([^\/]*)\/([^\/]*)$//; # strip the last two parts (filename and current folder) to get to '../' push(@INC, $temp); # now it's got the right folder require "config.pl"; # so the '../' isn't needed