|laziness, impatience, and hubris|
Parsing data into an Array of Hashesby nimdokk (Vicar)
|on Sep 18, 2003 at 12:44 UTC||Need Help??|
nimdokk has asked for the
wisdom of the Perl Monks concerning the following question:
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:
Field1= a value,Field2= another value, Field3= yet another value
(note these would all be one long line)
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.
Thanks in advance.
"Ex libris un peut de tout"