Here's my go (based on examples in the docs)...
#!/usr/bin/perl use strict; use warnings; use WWW::Mechanize; use HTML::TableContentParser; my $url = q|http://64.144.108.98/history/Allplayersstate.asp?State=AL| +; my $mech = WWW::Mechanize->new() or die "couldn't get Mech object: $!"; $mech->get($url) or die "couldn't get: $!"; my $html = $mech->content() or die "content failed: $!"; my $p = HTML::TableContentParser->new(); my $tables = $p->parse($html); open my $fh, '>', 'tables.txt' or die "can't open output\n"; for my $t (@$tables) { for my $r (@{$t->{rows}}) { print $fh "Row: "; for my $c (@{$r->{cells}}) { my $data = $c->{data}; print $fh "[$data] "; } print $fh "\n"; } }
Extract from output:
Row: [13507] [4/30/1998] [<a href="Phistory.asp?Pid=13200">Acoff, Fred</a>] [1678 (1678)] [AL] [<a href="Tall.asp?Tid=785&SBy=LastName+Asc">3/16/1997</a>] Row: [71636] [5/31/2007] [<a href="Phistory.asp?Pid=56179">Akhtar, Jibran(Brian)</a>] [152 (152)] [AL] [<a href="Tall.asp?Tid=3332&SBy=LastName+Asc">7/8/2006</a>] Row: [45757] [12/31/9999] [<a href="Phistory.asp?Pid=30169">Alexy, Tom</a>] [1342 (1475)] [AL] [<a href="Tall.asp?Tid=3232&SBy=LastName+Asc">3/25/2006</a>] Row: [57249] [3/31/1991] [<a href="Phistory.asp?Pid=37455">Alford, Josh</a>] [594 (594)] [AL] [<a href="Tall.asp?Tid=0&SBy=LastName+Asc"></a>] Row: [57242] [3/31/1991] [<a href="Phistory.asp?Pid=37448">Alford, Tom</a>] [652 (652)] [AL] [<a href="Tall.asp?Tid=0&SBy=LastName+Asc"></a>] Row: [70273] [3/31/2009] [<a href="Phistory.asp?Pid=52193">Alter, Torin</a>] [1289 (1340)] [AL] [<a href="Tall.asp?Tid=3356&SBy=LastName+Asc">9/10/2006</a>] Row: [3865] [5/31/1994] [<a href="Phistory.asp?Pid=3673">Alvey, Clyde Henry</a>] [1578 (1578)] [AL] [<a href="Tall.asp?Tid=0&SBy=LastName+Asc"></a>] Row: [55518] [7/31/1990] [<a href="Phistory.asp?Pid=35871">Ammons, Jermey C.</a>] [859 (859)] [AL] [<a href="Tall.asp?Tid=0&SBy=LastName+Asc"></a>] Row: [59871] [4/30/1993] [<a href="Phistory.asp?Pid=39893">Anderson, Derriel</a>] [1173 (1173)] [AL] [<a href="Tall.asp?Tid=0&SBy=LastName+Asc"></a>] Row: [57295] [9/30/1990 [<a href="Phistory.asp?Pid=37497">Ardoin, Jean Louis</a>] [1567 (1567)] [AL] [<a href="Tall.asp?Tid=0&SBy=LastName+Asc"></a>]

In reply to Re: Frame download by wfsp
in thread Frame download by Anonymous Monk

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.