Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Inelegant code to compare file names

by RichardK (Parson)
on Sep 22, 2011 at 09:27 UTC ( [id://927305]=note: print w/replies, xml ) Need Help??


in reply to Inelegant code to compare file names

Hi John,

Would splitpath from File::Spec work to get the file name in your case ? I don't know how it works on windows but I found it's usually easier & gets things right :)

my ($volume,$directories,$file) = File::Spec->splitpath( $path );

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-24 04:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found