my $file="service.xml"; my $xml = new XML::Simple; my $data = $xml->XMLin("$file", ForceArray =>['Service','SystemReaction','Customers','Suppliers','SW','HW'],); print Dupmer ($data);