hodge-podge has asked for the wisdom of the Perl Monks concerning the following question:
For some reason though, the script isn't working. I am getting the error "Global symbol @forms requires explicit name at etc..."#!C:/Perl/bin -w use LWP::UserAgent; use HTML::Parser; use strict; use HTTP::Request::Common; my %form = "country_form_0"; my $i = 0; my $agent = LWP::UserAgent->new; $agent->timeout(60); my @fields = ("country", "years1%5B%5D","c_tab","idbtable"); my $url = "http://www.census.gov/ipc/www/idb/country.php"; my @countries=("GI","GR","GL","GJ","GQ","GT","GK","GV","PU","GY","HA", +"HO","HK","HU","IC"); my @years =("2000","2001","2002","2003","2004","2005","2006","2007","2 +008","2009","2010"); my @tabs =("0","1","2"); for(1..4){ my $response = $agent-> post($url, $forms [ "country" => $countries[$i], "years1%5B%5D" => $years[0], "c_tab" => '0', "idbtable" => '0' ]); my $cont = $agent->request($response); print "$cont"; $i++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Data Aggregation
by toolic (Bishop) on May 06, 2010 at 01:19 UTC | |
by hodge-podge (Novice) on May 06, 2010 at 01:34 UTC | |
by bv (Friar) on May 06, 2010 at 02:17 UTC | |
|
Re: Data Aggregation
by apl (Monsignor) on May 06, 2010 at 12:18 UTC |