http://qs321.pair.com?node_id=430550


in reply to about use LWP::Simple

The code itself looks ok, you didn't say whether your CGI setup actually works at all, does the following work for you?
#!/usr/bin/perl -w print "Content-type: text/html\n\n"; print<<_HTMLEND; <HTML> <BODY> <H1> hello </H1> </BODY> </HTML> _HTMLEND

Replies are listed 'Best First'.
Re^2: about use LWP::Simple
by Anonymous Monk on Feb 13, 2005 at 19:05 UTC
    This works ---> it will run as a cgi program and display 'hello' in the browser; now, if I add one line in the beginning use LWP::Simple; it will work in the command line, but if I try to display 'hello' in the browser, it will automatically redirect to some 'foo.example.com' and tell me 'This page cannot display'. Thanks to others for all the replies. I reply this one as it is easier for me to describe the problem.