Value of tag1 :1 Value of tag2 :caSystemId Value of tag1 :2 Value of tag2 :gaSystemId #### #! /usr/bin/perl use warnings; use strict; my $xml = { cmts => { STBDSG => { dsg => [ { tag1 => 1, tag2 => 'caSystemId', }, { tag1 => 2, tag2 => 'gaSystemId', } ] }}}; my $dsg_tags = $xml->{cmts}{STBDSG}{dsg}; for my $dsg (@$dsg_tags) { print "Value of tag1:", $dsg->{tag1}, "\n"; print "Value of tag2:", $dsg->{tag2}, "\n"; }