sawtooth has asked for the wisdom of the Perl Monks concerning the following question:
Greetings honorable Monks.
I am submitting some information directly from one Perl program located on a local client to another Perl program located on a web server. I need to verify that this information was successfully passed to the Perl program located on a web server. The code works and submits information successfully to the web server, but I have been unable to verify this from the client side program. Example snippet of the functioning code:
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 |
Back to
Seekers of Perl Wisdom