#! usr/bin/perl use strict; use warnings; use HTML::TreeBuilder::XPath; my $tree= HTML::TreeBuilder::XPath->new; $tree->parse_file(<<"HTML");
May-2015
2015-06-25
3.750
HTML my @rows = $tree->findnodes(q{//div[@class= 'Row May-2015']}); #my @rows=$tree->findnodes(q{ //div[ @class =~ /Cell/ ] }); print $#rows; for my $row ( @rows ){ my @cells = $row->findnodes(q{ //div[ @class =~ /Cell/ ] }); for my $cell ( @cells ){ #Dance( $cell ); print $cell; } } #### [ab@linux0059 html_tree_builder]$ perl code.pl -1[ab@linux0059 html_tree_builder]$