meng has asked for the wisdom of the Perl Monks concerning the following question:
It does work if I run it in the console using "perl test.pl", but it is not working as a cgi program, basically I cannot display anything in the browser, even it is just a "hello" here.#-------------------------------- #! /usr/bin/perl -w use CGI; use LWP::Simple; print "Content-type: text/html\n\n"; $url = "http://www.yahoo.com"; my $webpage = get($url); print $webpage; print<<_HTMLEND; <HTML> <BODY> <H1> hello </H1> </BODY> </HTML> _HTMLEND #-----------------------------------------
Edit by castaway - Added code tags
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: about use LWP::Simple
by chromatic (Archbishop) on Feb 13, 2005 at 07:59 UTC | |
Re: about use LWP::Simple
by holli (Abbot) on Feb 13, 2005 at 08:55 UTC | |
Re: about use LWP::Simple
by johnnywang (Priest) on Feb 13, 2005 at 08:18 UTC | |
by Anonymous Monk on Feb 13, 2005 at 19:05 UTC | |
Re: about use LWP::Simple
by dws (Chancellor) on Feb 13, 2005 at 18:37 UTC | |
Re: about use LWP::Simple
by geektron (Curate) on Feb 13, 2005 at 17:05 UTC | |
Re: about use LWP::Simple
by Paulster2 (Priest) on Feb 14, 2005 at 01:03 UTC |