Shizzle has asked for the wisdom of the Perl Monks concerning the following question:
When I run the program, it prints "Problem". Any#!/opt/gnu-irix/bin/perl use strict; use HTTP::Request::Common qw(POST); use LWP::UserAgent; my $ua = new LWP::UserAgent; my $req = POST 'http://www.usps.com/cgi-bin/zip4/zip4inq2', [ 'Delivery Address' => '3601 Fallstone Court', 'Zip Code' => '20744' ]; my $resp = $ua->request($req); if ($resp->is_success()) { print $resp->content(); } else { print "Problem\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Yet another question on POSTing with LWP
by mdillon (Priest) on Apr 22, 2002 at 21:13 UTC | |
by Shizzle (Novice) on Apr 23, 2002 at 13:13 UTC | |
|
Re: Yet another question on POSTing with LWP
by Corion (Patriarch) on Apr 22, 2002 at 21:14 UTC | |
by Shizzle (Novice) on Apr 23, 2002 at 13:14 UTC | |
|
Re: Yet another question on POSTing with LWP
by jsprat (Curate) on Apr 22, 2002 at 21:20 UTC | |
by ehdonhon (Curate) on Apr 22, 2002 at 21:37 UTC | |
by Shizzle (Novice) on Apr 23, 2002 at 04:28 UTC | |
by Shizzle (Novice) on Apr 23, 2002 at 04:25 UTC |