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

Re: table capture

by zentara (Archbishop)
on Apr 18, 2005 at 12:29 UTC ( [id://448809]=note: print w/replies, xml ) Need Help??


in reply to table capture

Here is an example using HTML::TableExtract. Look at the printout, and you should be able to regex it (or deduce the array structure) and assign it to variables.
#!/usr/bin/perl use HTML::TableExtract; use LWP::Simple; use Data::Dumper; my $te = new HTML::TableExtract(gridmap=>1); my $content = get("http://www.cse.lk/marketinfo/splsum.jsp"); $te->parse($content); foreach $ts ($te->table_states) { foreach $row ($ts->rows) { #print Dumper $row; print @{$row},"\n"; } }

I'm not really a human, but I play one on earth. flash japh

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-26 00:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found