|
|
| XP is just a number | |
| PerlMonks |
Re: parse filenamesby 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.
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.
_
_
_
_
_
_
_
_
_
_
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||