The best way to generate HTML content from PERL is
to use the CGI module.
Here's a sample code:
//first.cgi
use CGI;
my $cgi = new CGI;
print $cgi->header; #header info
print $cgi->start_html(-TITLE=>"My First HTML thru PERL"
#prints<HTML>,<BODY> ,<TITLE> tags.
print $cgi->p("Hello and welcome to CGI"
#This is to print text
print $cgi->end_html;#end of HTML,prints </BODY></HTML>,
Save this file as a .cgi file on your webserver to view the html content.Your CGI script will be automatically excuted
(Need not be called from any program).
Check out..
$man CGI
if you have PERL installed on your UNIX or other
CGI tutorials on the internet.(
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.