Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Answer: How do I extract a file name from a path string

by t0mas (Priest)
on Oct 04, 2000 at 13:21 UTC ( #35238=categorized answer: print w/replies, xml ) Need Help??

Q&A > strings > How do I extract a file name from a path string - Answer contributed by t0mas

The File::Basename module is probably what you want.
use File::Basename; ( $name, $path, $suffix ) = fileparse( $filename_with_path, "\.[^.]*" +);
/brother t0mas

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2017-02-28 13:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (400 votes). Check out past polls.