Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: about use LWP::Simple

by johnnywang (Priest)
on Feb 13, 2005 at 08:18 UTC ( #430550=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://430550]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2023-02-06 05:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (33 votes). Check out past polls.

    Notices?