<?xml version="1.0" encoding="windows-1252"?>
<node id="292371" title="Parsing data into an Array of Hashes" created="2003-09-18 08:44:00" updated="2005-01-11 11:09:16">
<type id="115">
perlquestion</type>
<author id="153701">
nimdokk</author>
<data>
<field name="doctext">
I'm seeking some guidance here. I have reports that I would like to parse into hashes to make for easier access of the data. The raw data would look like this:
&lt;pre&gt;
Field1= a value,Field2= another value,
Field3= yet another value&lt;/pre&gt;&lt;br&gt;
(note these would all be one long line)
&lt;p&gt;
This would be one entry in the raw data file, each entry ends with a newline. It looks to me like an array of hashes. I know that I need to first split the line based on the comma. Then take and split each key=value pair and feed it into a hash. I don't really have any sample code to display at the moment. I'm mainly looking for suggestions on how to do the data manipulations of this kind.&lt;p&gt;
Thanks in advance.
&lt;p&gt;
&lt;hr&gt;
"Ex libris un peut de tout"</field>
</data>
</node>
