Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
XP is just a number
 
PerlMonks  

Re: parse filenames

by snafu (Chaplain)
on Apr 12, 2002 at 15:20 UTC ( [id://158649]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to parse filenames

I highly highly highly suggest going with lshatzer's suggestion and also read this node titled "Parse out the extension of a filename - return base of filename." written by yours truly. The portion of code to pay special attention to is by rob_au.

This might be a really good node for you and indeed this subject has come up many times. If you will notice, I was trying to re-invent the wheel which many people like to try and do with this particular subject. I quickly learned, however, that I just invented a poorer implementation of the mouse-trap :(. I learned something though! :)

The File::Basename module, imho, should be the only way to go for this task in a production script.

_ _ _ _ _ _ _ _ _ _
- Jim
Insert clever comment here...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://158649]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.