|Think about Loose Coupling|
Possible to treat an HTML::TreeBuilder object as a filehandle?by jms53 (Monk)
|on Feb 11, 2014 at 09:03 UTC||Need Help??|
jms53 has asked for the
wisdom of the Perl Monks concerning the following question:
I'm using HTML::TreeBuilder to extract data from an HTML table. The obvious solution would be to use HTML::TableExtract which would work if my data was organized nicely.
My data fits entirely in one cell, with titles in span tags as follows:
By using the look_down method, I was able to create a list of authors, and a list of books. What I have not been able to do, is assign a book to a given author, in order to sort for example by number of published books.
I thought of doing something as follows:
Maybe I'm barking up the wrong tree? Thank you for the input!