#!/usr/bin/perl use warnings; use strict; use LWP::Simple; use HTML::TableExtract; my $url; $url="http://www.earnings.com/fin/earnListing.jsp?tckr=&exch=&eff=&date=2003-05-04"; my $content=get $url; my $te = new HTML::TableExtract( headers => [qw(Company Symbol Estimate Actual)] ); $te->parse($content); # Examine all matching tables foreach my $ts ($te->table_states) { print "Table (", join(',', $ts->coords), "):\n"; foreach my $row ($ts->rows) print join ',', grep { s/\s{2,}//g; } @$row; print "\n"; } } #### ACME Communications, Inc.,ACME,-$0.43, -$0.67 American Axle & Manufacturing Holdings Inc,AXL,$0.84, $1.02 Arch Chemicals Inc,ARJ,-$0.23, $0.11 Barry (R G) Corporation,RGB,n/a, Boots&Coots/Int Well,WEL,n/a, $999.00 Cameco Corporation,CCJ,n/a, Chevron Texaco Corporation,CVX,$1.29, Cigna Corp,CI,$1.27, $1.46 DTE Energy Company,DTE,$1.26, Gaylord Entertainment Co. (New),GET,n/a, Grant Prideco Inc,GRP,$0.02, $0.04 Grupo Financiero Galicia S.A. - American Depositary Shares Representing Class B*,GGAL,n/a, Hardinge, Inc.,HDNG,n/a, Hearst - Argyle Television Series A,HTV,$0.39, $0.11 Home Properties Of Ny Inc.,HME,$0.77, $0.60 Insmed, Inc.,INSM,-$0.33, JP Realty Inc.*,JPR,$0.64, Mge Energy Inc.,MGEE,n/a, OSI Systems, Inc.,OSIS,$0.23, $0.29 OXiGENE, Inc.,OXGN,-$0.23, Pinnacle West Capital Corp.,PNW,$0.57, Plains Resources, Inc,PLX,$0.41, Sun Communities Inc.,SUI,$0.88, $0.92 Superior Energy Service Inc,SPN,$0.07, $0.10 Tanox, Inc.,TNOX,-$0.19, -$0.14 Tyler Technologies Inc,TYL,$0.04,