Click to See Complete Forum and Search --> : Perl usage question


squishy
08-05-2006, 12:40 AM
Take javascript or php for example. They can be embedded within an HTML document. Javascript uses <script> and PHP uses <?php.

So far all my Perl programs have been written entirely in Perl, and ran as an external script to whatever prompts it.

Can Perl be embedded into an HTML file? Or does the entire file have to be written in Perl, using the print function to create HTML?

NogDog
08-05-2006, 12:50 AM
Unless there's some extension I don't know about, you have to write Perl scripts which output HTML.

maeglin
08-26-2006, 02:34 AM
HTML::Mason provides an excellent templating language for Perl, we've been using it for three years. Besides embedding code, it makes it easier to separate the code from the HTML.
www.masonhq.com

Nedals
08-27-2006, 12:23 PM
Also take a look at HTML::Template.

Scriptage
08-27-2006, 02:49 PM
http://www.xav.com/perl/Components/Windows/PerlScript.html