in reply to Changing every page at once...

If you want to generate the pages offline, not dynamically, I suggest that you take a look at the Website Meta Language. It isn't a Perl script, but it offers accessibility via Perl and does just what you want.