in reply to How to analyse structured data to get a hash

To show another common Perl technique for your toolbox...
Use match global to create a list of pairs: Key,value,key2,value2,etc and simply assign that list to a hash variable. Bingo, a multi-key hash with the value assignments from one line of data. I recommend careful study of the regex to understand the specifics of exactly how it works. Update: the concept of a minimal vs a maximal match applies.
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; while (<DATA>) { my %hash = /\s*(.*?)="(.*?)"/g; print Dumper \%hash; } =Prints: $VAR1 = { 'value' => '2017-06-03T11:27:23+01:00', 'type' => 't', 'desc' => 'Time file was created.', 'ord' => '3', 'Attr num' => '101', 'name' => 'Created' }; =cut __DATA__ Attr num="101" name="Created" desc="Time file was created." type="t" o +rd="3" value="2017-06-03T11:27:23+01:00"