use File::Spec; BEGIN { if ($ENV{'PAR_TEMP'}) { my $dir = File::Spec->catfile ($ENV{'PAR_TEMP'}, 'inc'); chdir $dir or die "chdir: '$dir': $!"; } }