in reply to How do I create an array of hashes from an input text file?

XML::Simple is probably the easiest place for you to start. Take a look at the ForceArray parameter to get a more consistent data structure. Once you have a data structure, dump it with Data::Dumper or the like to see what you're working with.

use XML::Simple; use Data::Dumper; my $xml = '<xml><item><key1>someValue</key1><key2>someValue</key2><key +3>someValue</key3><key4>someValue</key4></item><item><key1>someValue< +/key1><key2>someValue</key2><key3>someValue</key3><key4>someValue</ke +y4></item></xml>'; my $data = XMLin($xml, ForceArray => 1); print Dumper($data);