use File::Spec::Functions qw(catfile splitdir); my @pathnames = splitdir '//special/semantic//path/definition'; my $path1 = catfile @pathnames; # '/special/semantic/path/definition +' my $path2 = join '/', @pathnames; # '//special/semantic//path/definiti +on'
In reply to catfile/catdir collapses two leading slashes // by repellent
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |