S
stylechief
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:
<code>
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);
</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:
<code>
if (!defined (get($url))){ print"Failed: $!\n$^E\n}
</code>
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!
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:
<code>
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);
</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:
<code>
if (!defined (get($url))){ print"Failed: $!\n$^E\n}
</code>
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!