#!/usr/bin/perl -- use strict; use warnings; use WWW::Mechanize; my @date = ( 18960101, "18960101\n", ); foreach my $date (@date) { my $mech = WWW::Mechanize->new(); $mech->agent_alias('Windows IE 6'); $mech->get("http://bub2.meteo.psu.edu/wxstn/wxstn.htm"); $mech->form_number(1); $mech->field( 'dtg', $date ); eval { $mech->click(); 1 } or print "$@\n", $mech->response->content, "\n"; print "-=> date => [$date] => ", $mech->status, "\n"; # my $file = "c:/perl/scripts/dates/$date.txt"; # $mech->save_content($file); $mech->back(); } __END__ -=> date => [18960101] => 200 Error POSTing http://bub2.met.psu.edu/cgi-win/WXDaily.EXE: Internal Error at 2 line 14 Error in /cgi-win/WXDaily.EXE

Error in /cgi-win/WXDaily.EXE

An internal Visual Basic error has occurred in /cgi-win/WXDaily.EXE.
Bad file name or number (error #52)
Please note what you were doing when this problem occurred, so we can identify and correct it. Write down the Web page you were using, any data you may have entered into a form or search box, and anything else that may help us duplicate the problem. Then contact the administrator of this service:
<wjs1@psu.edu>
-=> date => [18960101 ] => 500