[vox-tech] Parsing Html

Jay Strauss vox-tech@lists.lugod.org
Wed, 11 Jun 2003 17:23:29 -0500


Thanks Mike, I like that.

Why do you have to use "\00" and then split on only "\0"?  I understand that
they are just markers to split by, but I'm missing something about the
escaping.

I was doing it like:

use strict;
use WWW::Mechanize;
my $m = WWW::Mechanize->new();
$m->get("http://quote.cboe.com/QuoteTable.asp");

$m->submit_form(fields=>{TICKER=>'QQQ',ALL=>2});

use HTML::TableContentParser;
my $p = HTML::TableContentParser->new();
my $option_data = $p->parse($m->content)->[13];
my @row = @{$option_data->{rows}};
my $col = shift @row;

print join("\t", map{$_->{data}} @{$col->{cells}}),"\n";

foreach my $row (@row) {
   $row->{cells}->[0]->{data} =~ /\>(.*)\</;
   print $1,"\n";
}



----- Original Message -----
From: "Mike Simons" <msimons@moria.simons-clan.com>
To: <vox-tech@lists.lugod.org>
Sent: Wednesday, June 11, 2003 4:54 PM
Subject: Re: [vox-tech] Parsing Html