in reply to How to use Perl in web pages?

I've used Microsoft's ASP pages, using Perl as the scripting language. So, just put the Perl code inside <% ... %> tags, like you are used to.

Mason, as mentioned on another reply, is similar. But, it is better at allowing you to make reusable modules for a page. I think you will find Mason to be a friendly and gentle transition to make, expecially for porting your old pages. You probably still need to improve existing stuff without re-engineering the whole site, and you've reached the limit on PHP's programming.

But... what's wrong with PHP? Are you bothered by everything being global and in the same namespace? Sure, Perl will be a change. Is the limitation the whole HTML file with embedded fragments? Mason may be a step up in allowing code to execute in more places during the process and affecting what gets done, and in breaking the page up into reusable modules. But it still has limits. I used Mason to make a web page for a store, and was able to design the reusable components (menus, header, footer, etc.) nicely, as it was a static site that just needed to customize the component for each page. I'm also using it on my personal site for a page that automatically picks up all the scans of pages and formats the page to organize and browse them (e.g. this one)

Just printing the HTML you want, under full control of the program, is the ultimate in flexibility. But it gets tedious quickly. There are modules to help with this, in simple ways such as formatting tags as easy as printing text, all the way up to template systems. You will like templates: HTML code for the rough page, but processing is under your control. Your code is on the outside, not the inside.

Finally, there are complete frameworks. Catalyst seems to be the top of the heap now. But you need to learn more than just Perl.