What you're doing wrong is assuming that all titles are going to have 12 words. Instead, try this:
@words = split / /, $titleclean; $filename = "$year-$mon-" . join("-",@words) . ".html";
The join bit in the middle tells perl to string @words together with a dash between each one.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re: Creating filenames
by roboticus
in thread Creating filenames
by htmanning
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |