Forum Moderators: coopster & phranque

Message Too Old, No Replies

HTML display with LWP

Is there any way to display LWP contens on HTML?

         

pomihong

6:33 am on Dec 3, 2006 (gmt 0)

10+ Year Member



Hi, Everyone, I am the beginner of learning Perl.
I found similar topic before but nobody answers yet.
I am trying to display a simple print content from LWP to HTML.
For Example.

#!/usr/bin/perl -w
use LWP::Simple;
use CGI qw/:standard/;

open(OUT, ">title03.txt");
select(OUT);
print "HELLO";
close(OUT);

print "Content-type: text/html", "\n\n";
print "<html><head><\head>\n";
print "<body><form>\n";
print "Hello<input type=\"text\" name=\"fname\"/>\n";
print "</form></body></html>";

So, I am trying to print "Hello" at both file and browser at the same time.
First of all, is it possible?
If yes, what is the way I can do it?
Thank you...

perl_diver

11:04 pm on Dec 3, 2006 (gmt 0)

10+ Year Member



it is possible and it should work like you have it.