LWP::UserAgent - 04 - post form data
#!/usr/bin/perl -w use strict; use LWP 5.64; my $word = shift; $word or die "Usage: perl altavista_post.pl [keyword]\n"; my $browser = LWP::UserAgent->new; my $url = 'http://www.altavista.com/web/results'; my $response = $browser->post( $url, [ 'q' => $word, # the Altavista query string 'pg' => 'q', 'avkw' => 'tgz', 'kl' => 'XX', ] );
Remember
push @{ $ua->requests_redirectable }, 'POST';
Slideshow ^ |< << Slide 33 of 40 >> >| |