Monks, I need your all knowing perl wisdom.
I am trying to figure out the look_down function. So far I haven't been able to find any good tutorials on the look_down function, but would like to learn more about it so I can easily pull information from tables out of text or html files.
Here is what I understand about the TreeBuilder Function, please correct me in any areas that I am wrong:
use HTML::TreeBuilder; This calls the "submodule" from the perl library for use in our code.
$myobject = HTML::TreeBuilder->new; Creates a new object for the treebuilder to build upon. This may sound dumb, can someone please explain what an "object" is? Also, what does this "->" tell the computer program to do?
$myobject->parse_file($my-file-to-pull-info-from); This fills the tree with the content based on html tags?
@a-new-array = $myobject->look_down(....); And this is the main area of confusion for me. I don't know how to tell the look_down function what to look for when searching tables, or how to locate specific information. An indepth look at the look_down function would be very helpful and greatly appreciated! Also, if I messed up any of the other items in my description of how to use HTML::TreeBuilder, please feel free to correct my mistakes.
Thanks for any help!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.