repellent has asked for the wisdom of the Perl Monks concerning the following question:
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'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: catfile/catdir collapses two leading slashes //
by ikegami (Patriarch) on Sep 17, 2008 at 18:25 UTC | |
by repellent (Priest) on Sep 17, 2008 at 20:31 UTC | |
by ikegami (Patriarch) on Sep 17, 2008 at 22:20 UTC | |
|
Re: catfile/catdir collapses two leading slashes //
by haoess (Curate) on Sep 17, 2008 at 07:16 UTC | |
by repellent (Priest) on Sep 17, 2008 at 07:37 UTC |