in reply to Perl LWP and POST
Maybe try something like this instead:
#!/usr/bin/perl -w use strict; use LWP::UserAgent; my $browser = LWP::UserAgent->new; my @req = ('http://www.wheresmycellphone.com/submit.php', [txtisdcode => 1, txtcitycode => '000', txtphone => '00000 +00']); my $response_to_discard = $browser->post(@req); print $response_to_discard->as_string();
In particular, that line
my $resp = (POST 'www . wheresmycellphone . com/', ['txtisdcode' => 1, + txtcitycode' => '000', 'txtphone' => '0000000']);
is wrong in several respects:
(I wonder how you got that past -w and use strict;...)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl LWP and POST
by ProgramIT (Novice) on May 31, 2009 at 14:59 UTC | |
by almut (Canon) on May 31, 2009 at 15:31 UTC | |
by ProgramIT (Novice) on May 31, 2009 at 18:14 UTC |