ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-unix-users
perl-unix-users
Re: [Perl-unix-users] Perl to print results in html page
by Bill Luebkert other posts by this author
Apr 27 2009 10:40PM messages near this date
[Perl-unix-users] Perl to print results in html page | Re: [Perl-unix-users] Perl to print results in html page
Saravanan Jothilingam wrote:
>  Hi,
>  
>  I am a beginner to perl. I have a requirement for my project, to print 
>  success/failed results of my automation suite in *_html page_*.
>  
>  It will be grateful, if anyone could share me the code if you have any.

Assuming you're talking a CGI script (called from your web server), all
you have to do is return a Content-Type header and print your data (both
to STDOUT).  If you're on IIS, you may need to output a status hdr first.
You could just use CGI.pm to do the work, but there's not much to do.

print "HTTP/1.1 200 OK\n" if $ENV{SERVER_SOFTWARE} =~ /IIS/;

print "Content-type: text/html\n\n";
or
print "Content-type: text/plain\n\n";	# for just some plain text

print other stuff here.
_______________________________________________
Perl-Unix-Users mailing list
Perl-Unix-Users@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Saravanan Jothilingam
Bill Luebkert
Saravanan Jothilingam

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved