merrymonk has asked for the wisdom of the Perl Monks concerning the following question:
I have a file with rows of data which are typically like
Attr num="101" name="Created" desc="Time file was created." type="t" ord="3" value="2017-06-03T11:27:23+01:00"I want to analyse this so that I can get a hash with data like
Attr num ->101 Name ->Created Desc ->Time file was created Type ->t Ord ->3 Value->2017-06-03T11:27:23+01:00
Therefore it would be the equivalent of
$attr{Name} = Created etcWhat is the simplest way of analysing the line to get the hash data?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to analyse structured data to get a hash
by Marshall (Canon) on Jun 04, 2017 at 00:22 UTC | |
|
Re: How to analyse structured data to get a hash
by hippo (Archbishop) on Jun 05, 2017 at 08:23 UTC | |
|
Re: How to analyse structured data to get a hash
by huck (Prior) on Jun 03, 2017 at 16:12 UTC | |
by Marshall (Canon) on Jun 04, 2017 at 03:55 UTC | |
|
Re: How to analyse structured data to get a hash
by LanX (Saint) on Jun 03, 2017 at 14:49 UTC | |
|
Re: How to analyse structured data to get a hash
by locked_user sundialsvc4 (Abbot) on Jun 05, 2017 at 13:09 UTC | |
by jdporter (Paladin) on Jun 09, 2017 at 15:33 UTC |