in reply to Re^2: Parse HTML Code for hidden values
in thread Parse HTML Code for hidden values

Unlike in your HTML example in the OP, the dump suggests you have many td's in one tr, not one td per tr. You can for example add an inner loop over the td's - but if the structure of your data is not fixed, you can have similar problems every time another level of nesting appears!

Replies are listed 'Best First'.
Re^4: Parse HTML Code for hidden values
by ikegami (Patriarch) on Sep 05, 2010 at 04:21 UTC
    Using ForceArray => [qw( table tr td )],
    my %rec; for my $table (@{ $response->{body}{table} }) { for my $tr (@{ $table->{tr} }) { for my $td (@{ $tr->{td} }) { my ($key) = grep $_ ne 'content', keys(%$td); $rec{$key} = $td->{$key}; } } } print("$rec{LastName}\n"); # For example