perl_seeker has asked for the wisdom of the Perl Monks concerning the following question:
Hello!
I have an array of arrays built by parsing data from an XML file, which looks like this.
For each consecutive 5 (for the time being, better to make this a variable)rows (days) where the temperature values
fall in the same range, I need to store in another array of arrays the start date, end date and a string describing the temperature range.
For example the array of arrays could look like:
Thanks
perl_seekr :)
I have an array of arrays built by parsing data from an XML file, which looks like this.
Each row contains a date and a temperature value. I need to search the temperature values in this array of arrays.1-1-2004 33.95 2-1-2004 30.34 3-1-2004 31.50 4-1-2004 32.50 5-1-2004 33.50 . . . . . . . . .
For each consecutive 5 (for the time being, better to make this a variable)rows (days) where the temperature values
fall in the same range, I need to store in another array of arrays the start date, end date and a string describing the temperature range.
For example the array of arrays could look like:
The temperature ranges I need to use are:1-1-2004 5-1-2004 hot 10-1-2004 15-1-2004 warm 25-1-2004 30-1-2004 mild ... ... ...
Any help with coding this ?Any code or help would be appreciated.Over 40.0 extremelyhot 35.0 to 39.9 veryhot 30.0 to 34.9 hot 25.0 to 29.9 verywarm 20.0 to 24.9 warm 15.0 to 19.9 mild
Thanks
perl_seekr :)
2004-11-03 Edited by Arunbear: Changed title from 'Searching in an array of arraya.', as per Monastery guidelines
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Searching in an array of arrays
by zejames (Hermit) on Nov 03, 2004 at 12:09 UTC | |
by Taulmarill (Deacon) on Nov 03, 2004 at 13:53 UTC | |
by perl_seeker (Scribe) on Nov 04, 2004 at 08:52 UTC | |
by zejames (Hermit) on Nov 04, 2004 at 09:54 UTC | |
by perl_seeker (Scribe) on Nov 04, 2004 at 10:20 UTC | |
Re: Searching in an array of arrays
by trammell (Priest) on Nov 03, 2004 at 16:40 UTC | |
Re: Searching in an array of arrays
by TedPride (Priest) on Nov 04, 2004 at 08:41 UTC | |
by perl_seeker (Scribe) on Nov 04, 2004 at 09:55 UTC | |
by perl_seeker (Scribe) on Nov 04, 2004 at 11:45 UTC |
Back to
Seekers of Perl Wisdom