My DBD::AnyData and AnyData modules have an HTMLtable format that uses HTML::TableExtract to pull information from local or remote HTML files or from HTML strings. The plain AnyData module puts the results in a multi-dimensional hash, the DBD::AnyData module puts it into a temporary in-memory DBI/SQL accessible database. If you use the DBD, you can then make use of the many modules that format DBI table data to display it any way you like. Here are examples of use of the two modules (assuming the table has columns user and city and that you want to find Fred Bloggs' city):
#!perl -w use strict use AnyData; my $table = adTie( 'HTMLtable', $filename_url_or_string); while (my $row = each %$table) { printf "%s : %s\n", $row->{user},$row->{city}; } or ... #!perl -w use strict; use DBI; my $dbh=DBI->connect('dbi:AnyData:'); $dbh->ad_catalog( 'Test','HTMLtable', $filename_url_or string); print $dbh->selectrow_array('SELECT city FROM Test WHERE user = ?',und +ef,'Fred Bloggs');
If the file or URL contains more than one table, you can pass HTML::TableExtract values defining the number or headings via the AnyData modules to specify which table you want.

In reply to Re: Storing table data in a (simulated) multidimensional array by jZed
in thread Storing table data in a (simulated) multidimensional array by smack

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.