#! /usr/bin/perl use strict; use warnings; use Data::Dumper; $Data::Dumper::Indent=1; use HTML::TreeBuilder; my $t = HTML::TreeBuilder->new_from_file(*DATA); my ($table) = $t->look_down(_tag => q{table}); my @rows = $table->look_down(_tag => q{tr}); my %db; for my $row (@rows){ my $key = $row->look_down(class => q{rlab})->as_text; my $value = $row->look_down(class => q{l})->as_text; $db{$key} = $value; } for my $key (keys %db){ printf qq{%s -> %s\n}, $key, $db{$key}; } __DATA__ Person Profile
Profile
Short Name: John
Long Name: John Abraham
Company: Idea
Currency: EUR
#### Company: -> Idea Long Name: -> John Abraham Currency: -> EUR Short Name: -> John