Beefy Boxes and Bandwidth Generously Provided by pair Networks Ovid
We don't bite newbies here... much
 
PerlMonks  

Re: Can I code perl inside HTML?

by john1987 (Acolyte)
on Feb 01, 2001 at 20:29 UTC ( [id://55845]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Can I code perl inside HTML?

You can put Perl in "virtually" any extension, as long as you got your #!/usr/bin/perl coding correct, and your server supports Perl. Perl usually has 2 main extensions: .pl .cgi and .pm (.pm is Perl modules). What would be much easier is to put the html in the Perl code. This way you can avoid modules, not that it would matter but just to be quicker. If you are not sure of how to put HTML into Perl, here's a very simple code to use:
print "Content-type: text/html\n\n"; print "<html><b><u><font size=4>Yo! Wasup?</font></u></b></html>\n";
This is a VERY simple code but yet effective.

One person can change the corse of history. One person can destroy the human race. That one person is out there, I intend to find him.

My other writings.

Replies are listed 'Best First'.
Re: Re: Can I code perl inside HTML?
by dws (Chancellor) on Feb 01, 2001 at 20:41 UTC
    True for Apache. Not true for IIS.

    IIS ignores the #! line. Instead, it uses the extension to map (by way of the registry) to the executable to handle the script.

    ActivePerl reads the #! line, but only to pick up arguments.

      Including me, most people usually use appache, but thanx for the extra information, its well needed.

      One person can change the corse of history. One person can destroy the human race. That one person is out there, I intend to find him.

      My other writings.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://55845]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.