tdudgeon has asked for the wisdom of the Perl Monks concerning the following question:
I am writing a script that will process multiple log files to look for a maximum value in each. Once found, I need to compare that max value found in each log file to it's corresponding max value stored in a CSV file.
My question:
What memory structure would be best suited to storing this data ? (Array of Hashes, Hash of Hashes etc) (Maximum Log File)
DOW,Sep,18,09:31:16,440,29,142,10148,4
Russell2000,Sep,18,09:31:16,440,29,142,10148,4
RussellComposite,Sep,18,09:31:16,440,29,142,10148,4
Russell1000,Sep,18,09:31:16,440,29,142,10148,4
SP500,Sep,18,09:31:16,440,29,142,10148,4
Additional info:
1. The process files provide the category (ie DOW, SP500 etc) and I will be comparing the processed max value against the 7th element of the CSV file for the specific category.
2. If the maximum processed value is greater than the value currently stored in the CSV file, then I need to ultimately update the row in the CSV file.
3. When all file processing is complete, I need to sort the memory structure in ascending order on the 7th element then output back to a CSV file.
Please let me know if additional info is needed.
Thanks
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Hashes and Arrays - Selecting a memory structure
by GrandFather (Saint) on Sep 20, 2007 at 05:51 UTC | |
by tdudgeon (Initiate) on Sep 20, 2007 at 18:01 UTC | |
by GrandFather (Saint) on Sep 20, 2007 at 19:23 UTC | |
Re: Hashes and Arrays - Selecting a memory structure
by hangon (Deacon) on Sep 20, 2007 at 06:14 UTC | |
Re: Hashes and Arrays - Selecting a memory structure
by bruceb3 (Pilgrim) on Sep 20, 2007 at 05:54 UTC | |
Re: Hashes and Arrays - Selecting a memory structure
by philc (Acolyte) on Sep 20, 2007 at 12:26 UTC |