in reply to Re: Re: Re: Just Another Lotto Script
in thread Just Another Lotto Script
--JD## i shouldn't do this, should i? # #open(HTML,">html.txt"); #print HTML @html; #close(HTML); my $html; foreach my $line (@html) { $html .= $line; } ## extract table info from array # my $extract = new HTML::TableExtract( headers => ['Date','Numbers'] ); my $ts; my $row; undef $/; ## help? # #open(HTML, "html.txt"); #my $lotto = <HTML>; #close(HTML); open(NUMBERS, ">c4_numbers.txt"); ## changed $lotto to $html $extract->parse($html); foreach $ts ($extract->table_states) { foreach $row ($ts->rows) { print NUMBERS join(":", @$row), "\n"; } } close(HTML); close(NUMBERS);
|
|---|