Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

catfile/catdir collapses two leading slashes //

by repellent (Priest)
on Sep 17, 2008 at 07:09 UTC ( [id://711894]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use File::Spec::Functions qw(catfile splitdir);
    
    ...
    
    my $path1 = catfile @pathnames;   # '/special/semantic/path/definition
    +'
    my $path2 = join '/', @pathnames; # '//special/semantic//path/definiti
    +on'
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://711894]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found