use Data::Dump::Streamer; my $xml = XML::Simple->new(); my $d = $xml->XMLin("sample.xml",ForceArray => 1, KeepRoot => 1); Dump $d; #### $HASH1 = { inbox => [ { item => [ { description => [ 'Bar' ], title => [ 'Foo' ] }, { description => [ 'Foobar' ], title => [ 'Baz' ] } ] } ] }; #### my $d = $xml->XMLin("sample.xml"); #### $HASH1 = { item => [ { description => 'Bar', title => 'Foo' }, { description => 'Foobar', title => 'Baz' } ] }; #### for my $item ( @{ $d->{item} } ) { print "$item->{title}\n"; # for example }