sawtooth has asked for the wisdom of the Perl Monks concerning the following question:
This submits the information and everything works fine on the web server the way that it should. Now, the LWP::Simple docs say that the get() function returns undef if it fails. I have been unable to find a combination of code that works. Among them, after the above snippet:use strict; use LWP::Simple; use URI::URL; my $url=url('http://www.webaddress.com/cgi-bin/XXX.pl'); $url->query_form( name => $name, address => $address, email => $email, reading => $reading, ); get($url);
Does not work. I am sure that this is simple, however, this is my first voyage into the land of libwww-perl. Please and thank you!if (!defined (get($url))){ print"Failed: $^E\n}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Checking for undef after performing get()
by trammell (Priest) on Jan 09, 2006 at 22:20 UTC | |
by sawtooth (Initiate) on Jan 10, 2006 at 14:48 UTC | |
by trammell (Priest) on Jan 10, 2006 at 15:08 UTC | |
by sawtooth (Initiate) on Jan 11, 2006 at 16:21 UTC |