I was inspired by LanX's comment here:

You know, you could use this technology to build a training site for Perl with interactive programming challenges...

And I created a set of HTML pages that can be embedded into <iframe>s and run Perl!

WebPerl Code Demo Editor

Includes documentation, I hope it's clear, let me know if you have questions!