Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: catfile/catdir collapses two leading slashes //

by ikegami (Patriarch)
on Sep 17, 2008 at 18:25 UTC ( [id://712091]=note: print w/replies, xml ) Need Help??


in reply to catfile/catdir collapses two leading slashes //

Since File::Spec::Functions is system specific, the warning ("Don't assume ...") doesn't apply.

Since you are using a unix system, "//" can be collapsed, and you get

/special/semantic/path/definition

Since I use a Windows system, leading "\\" is special, and I get

\\special\semantic\path\definition

Replies are listed 'Best First'.
Re^2: catfile/catdir collapses two leading slashes //
by repellent (Priest) on Sep 17, 2008 at 20:31 UTC
    Then I would suggest Files and Filesystems be updated. After all, it did mention "two leading slashes".

    I was also confused, because it mentioned "networking and clustering filesystems". These filesystems are not platform-specific. Shouldn't caution be taken every time, since a *nix system could potentially access a Windows network FS?

      It's only used by the volume portion of UNC paths. If you were to mount a Windows share onto a unix system, I don't see why you'd use "\\" (or "//") anywhere. For example, if \\server\docs was mounted as /mount/docs, I presume \\server\docs\some\path would be addressed as /mount/docs/some/path.

      "Files and Filesystems" is correct. You shouldn't assume you can't. That doesn't mean you never can.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://712091]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-25 12:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found