Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^2: catfile/catdir collapses two leading slashes //

by repellent (Priest)
on Sep 17, 2008 at 07:37 UTC ( #711902=note: print w/replies, xml ) Need Help??

in reply to Re: catfile/catdir collapses two leading slashes //
in thread catfile/catdir collapses two leading slashes //

Sure. But let's not stray off-topic :)
use File::Spec::Functions qw(catdir catpath splitdir splitpath); my ($volume, $directories, $file) = splitpath '//special/semantic//pat +h/definition'; my @dir = splitdir $directories; my $dir1 = catdir @dir; # '/special/semantic/path' my $dir2 = join '/', @dir; # '//special/semantic//path/' my $path1 = catpath $volume, $dir1, $file; # '/special/semantic/path/d +efinition' my $path2 = catpath $volume, $dir2, $file; # '//special/semantic//path +/definition'

    The name of a directory is not the same as its pathname

There's always confusion with file nomenclature. See File system nomenclature. Death to path!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://711902]
[Discipulus]: good morning marto
[Discipulus]: if i can ask: which is the minimal (cheapest) configuration to have some hardware running a webserver with minimal traffic and wifi connection?
[marto]: Raspberry Pi 3?
[Discipulus]: thanks under 50 neuros it's a good thing!

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2017-10-17 09:48 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (225 votes). Check out past polls.