Help for this page
$whole_thing =~ m|<some unique html start string>(.*?)<end string>|s; $good_chunk = $1;
<div id="good_chunk">
while ( my $token = $p->get_tag( "div" ) ) { if ( $token->[1]->{'id'} eq 'good_chunk' ){ ... # for further parsing } }