I don't like both variants. They are not portable. It is better to use File::Spec for operations on filenames:
use File::Spec; my $dir = File::Spec->catdir($HOME, $first, $second);
In reply to Portable creation of paths
by IlyaM
in thread Using Variables in Path Names
by lfindle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |