Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

( #35298=categorized answer: print w/ replies, xml ) Need Help??

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

You should consider solving your problem in a different way. By using the opendir and readdir functions to get the entries in a directory, you automatically have the filename separate from the directory name, and you can do it all without spawning an external process.

Comment on Answer: How do I extract a file name from a path string
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 browsing the Monastery: (10)
As of 2014-10-01 11:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (9 votes), past polls