Help for this page
while ( $html =~ m{<div[^>]*>(.*?)</div>}sgi ) { my $inside_div = $1; ... # process contents of $inside_div ... }