Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Question about HTML and Perl

by eighty-one (Curate)
on Nov 06, 2008 at 13:45 UTC ( #721983=note: print w/replies, xml ) Need Help??


in reply to Question about HTML and Perl

You say your Perl script works and you want to embedd it's output in an HTML document. What might be a simpler and easier to set up approach would be to have the script write the HTML document. Then you access the script via CGI, as explained in the links posted above by GrandFather.

So the script builds an HTML document and sends it's output to the browser, and the browser renders it as it would any other document.

There are ways you can embed Perl code within your document, and have the document be parsed as it's sent to the browser so that the code gets executed and replaced by it's own output. But I think it might be easier to start with CGI - when I was new to Perl I remember setting up CGI was fast and easy, but I don't know how difficult other approaches might be to a new Perl programmer, as I never tried when I was one.

Actually, there was a book I had for a class that I think had a good explanation of CGI and setting up a simple dynamic web page with Perl - but all I can remember is that it had a yellow and black cover. From scanning the pictures at Google shopping, I think it might have been Beginning Perl.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://721983]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2021-10-23 21:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (88 votes). Check out past polls.

    Notices?