Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Using HTML::TableExtract

by sacked (Hermit)
on Jun 18, 2004 at 16:15 UTC ( [id://367983]=note: print w/replies, xml ) Need Help??


in reply to Using HTML::TableExtract

The original html output has newlines and multiple spaces in the table header names, so they don't match the headers you specified. Adding the following after retrieving the html corrected the problem:
$raw_html =~ tr/\n//d; $raw_html =~ tr/ //s;
The output is now:
Table (2,4): eMap, 2.90, All, August 7, 2003 eTrex, 2.14, All, June 14, 2002 ...

--sacked

Replies are listed 'Best First'.
Re^2: Using HTML::TableExtract
by Roy Johnson (Monsignor) on Jun 18, 2004 at 16:25 UTC
    Your tr statements can be combined:
    $raw_html =~ tr/ \n/ /ds;

    The power of tr///

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://367983]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-16 13:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found