Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: table capture

by zentara (Archbishop)
on Apr 18, 2005 at 12:29 UTC ( #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
Node Status?
node history
Node Type: note [id://448809]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2020-06-04 18:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (35 votes). Check out past polls.

    Notices?