|more useful options|
Grabbing year and month from filenameby htmanning (Pilgrim)
|on Aug 01, 2018 at 04:26 UTC||Need Help??|
htmanning has asked for the wisdom of the Perl Monks concerning the following question:
I have a database full of filenames based on article titles. For example:
"This is an Article Title" would match the filename 2010-7-this-is-an.html.
The old script created the filename with the first 3 words of the title, but it inserted the year and month the article was written at the beginning. It's always in the same format (year-month-filename.html).
I am trying to build filenames based on the full title, but keep the year and month at the beginning.
I can loop through and create new filenames based on the full title, but I don't know how to grab the year and month from the beginning of the filename. Help?