htmanning has asked for the wisdom of the Perl Monks concerning the following question:
Thanks. UPDATE: I ended up doing this. Is there a better way?@words = split (/ /, $titleclean); $filename = $year."-".$mon; #for ($i=0; $i<3; $i++) { for ($i=0; $i<12; $i++) { $filename = $filename."-".$words[$i]; } $filename = $filename.".html";
$filename =~ s/ /-/gi; $filename =~ s/--//gi; $filename =~ s/-\.html/\.html/gi;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Creating filenames
by roboticus (Chancellor) on Apr 02, 2012 at 19:57 UTC | |
by JavaFan (Canon) on Apr 02, 2012 at 20:51 UTC | |
by roboticus (Chancellor) on Apr 02, 2012 at 23:15 UTC | |
by ww (Archbishop) on Apr 02, 2012 at 20:04 UTC | |
by htmanning (Friar) on Apr 02, 2012 at 20:19 UTC | |
by ww (Archbishop) on Apr 02, 2012 at 20:23 UTC | |
by htmanning (Friar) on Apr 02, 2012 at 20:51 UTC | |
|
Re: Creating filenames
by ww (Archbishop) on Apr 02, 2012 at 19:57 UTC |