Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2016-09-25 19:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (472 votes). Check out past polls.