When I ran the above scrip on commandline, it worked. But when I ran it
from a browser, it failed and I found a message in the log file saying
that $content is undef.
Wrong group -- there is a Perl Beginner CGI list too :)
But, in the interest of completeness:
#! /usr/bin/perl -w
use strict; use LWP::Simple; use CGI qw(:standard);
my $content = get qw(http://yahoo.com);
print<<__TheHeaders__; Content-type: text/html
ARE MISSING SILLY! See: <P>http://insecurity.org/cgi/x.cgi <hr noshade>
$content __TheHeaders__
__END__
This error, missing the HTTP headers, would have shown in your logs as:
Premature End of Script headers...
YOU SHOULD ALWAYS CHECK YOUR LOGS!
-- _Sx_ http://youve-reached-the.endoftheinternet.org/ _____ perldoc -qa.a | perl -lpe '($_)=m("(.*)")' | grep Martian
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
