Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Queries on HTML::TableExtract - How to parse from saved html file

by influx (Beadle)
on Aug 08, 2012 at 08:37 UTC ( #986181=note: print w/replies, xml ) Need Help??


in reply to Queries on HTML::TableExtract - How to parse from saved html file

I don't know much about that module, but if parse_file() isn't very persistent, then perhaps you could slurp the file into a string and continue using the parse() method instead

For larger files you might be better off using File::Slurp or something

use File::Slurp 'read_file'; my $html = "/path/to/file.html"; my $str = read_file($html);

Once you've done that, then you can just parse $str as you normally would a string.

  • Comment on Re: Queries on HTML::TableExtract - How to parse from saved html file
  • Download Code