use File::Spec; my $path = File::Spec->catfile( qw/ a b c / );