Why do you need to embed perl in html? Can your solution be re-thought to fully/properly separate logic and content? My personal favorte is
Template::Toolkit, which can embed perl but it's primary use is as a very powerful template engine.
Can you post a specific example of a perl snippet you are thinking that you need to embed?