use strict; use warnings; use HTML::TreeBuilder; my $p = HTML::TreeBuilder->new; my @content = ; $p->parse_content(@content); for my $match ($p->look_down('_tag' => 'div', 'class' => 'subsection')) { my $prop = $match->look_down ('class', 'box_profile_info_small_heading'); my $value = $match->look_down ('class', 'box_profile_info_small_content'); next unless $prop && $value; print $prop->as_text (), ' => ', $value->as_text (), "\n"; } #### About Me => you will know me better if you want to... Who I'd Like To Meet => i'd like to meet all the world... Sexual Orientation => Straight Drinker => No Smoker => Socially