use File::Spec; my $dir = File::Spec->catdir($HOME, $first, $second);