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?
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Grabbing year and month from filename
by vinoth.ree (Monsignor) on Aug 01, 2018 at 05:26 UTC | |
|
Re: Grabbing year and month from filename
by Marshall (Canon) on Aug 03, 2018 at 03:46 UTC |