Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Question about HTML and Perl

by eighty-one (Curate)
on Nov 06, 2008 at 13:45 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-18 01:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found