Hi, did you check the content of dates.txt? Maybe there's a problem with the line - e.g. like a whitespace somewhere? The following alternative approach (cut and paste and modify from lwpcook) worked fine for me...
Update: It directly accesses the service and does not require to fetch and parse the htm file each time. That should be slightly faster and reduces the network traffic (didn't bench-marked it).

use LWP::UserAgent; $ua = LWP::UserAgent->new; my $req = HTTP::Request->new(POST => 'http://bub2.met.psu.edu/cgi-wi +n/WXDaily.EXE'); $req->content_type('application/x-www-form-urlencoded'); $req->content('dtg=18961110'); my $res = $ua->request($req); print $res->as_string;

However, I am not sure if leeching approx. 41600 pages is a good idea. Maybe your IP or your user-agent is already on the black-list of their web-admin? My advice would be to contact the person responsible for this service and kindly ask for the raw data. Universities usually share such information for research purpose. Don't know what they do if you plan to use this information in a commercial context, though.


In reply to Re: Connection Timeout duing form submissions by Perlbotics
in thread Connection Timeout duing form submissions by cheech

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.