use File::Spec; my @pkorr = qw(E: temp); my $file_in = File::Spec->catfile( @pkorr, 'test2.doc' );