in reply to XML::Simple parse attributes
my $tc = $xml->{dut}->[0]->{tc}; foreach my $id (keys %$tc) { if ($tc->{$id}->{result} eq 'Passed'){$Passed++;} if ($tc->{$id}->{result} eq 'Warnings'){$Warnings++;} if ($tc->{$id}->{result} eq 'Failed'){$Failed++;} }
Dumping the $xml object with e.g. Data::Dumper helps in such a case.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|