in reply to Re^4: Problem in reading parsed xml using XML::Simple
in thread Problem in reading parsed xml using XML::Simple

Again, your data is something else than you've showed us.
#!/usr/bin/perl use warnings; use strict; my $xst = { 'cmts' => { 'STBDSG' => { 'dsg' => [ { 'tag1' => '1', 'tag2' => 'caSystemId', }, { 'tag1' => '2', 'tag2' => 'gaSystemId', } ] }}}; my %dsg_tags; $dsg_tags{'tag1'} = $xst->{cmts}{STBDSG}{dsg}[0]{tag1}; foreach (sort keys %dsg_tags) { print "$_ : $dsg_tags{$_}\n"; } __END__ Output: tag1 : 1
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ