You are talking about the HTML::Element
module. HTML::Element
objects are usually built by parsing an HTML document using HTML::TreeBuilder
. Please read the documentation: it is very well written.
You need to call the look_down
method like this
my @divs = $doc->look_down(_tag => 'div', class => 'myclass');
where myclass
should be replaced by the value of the class
attribute that you want to select.
@divs
will contain a list of HTML::Element
objects that match those criteria.