Embperl is a Perl extension module which gives you the power to
embed Perl code directly in your HTML documents (like server-side
includes for shell commands).
If building more than a single page, you may also want to take a look
at perldoc EmbperlObject which
lets you build your website out of small reusable objects.
Additionally, perldoc HTML::Embperl::Mail allows
you to send the resulting page via email.