Hello!
I have an array of arrays built by parsing data from an XML file, which looks like this.
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 . . . . . . . . .
Each row contains a date and a temperature value. I need to search the temperature values in this array of arrays.
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:
1-1-2004 5-1-2004 hot 10-1-2004 15-1-2004 warm 25-1-2004 30-1-2004 mild ... ... ...
The temperature ranges I need to use are:
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
Any help with coding this ?Any code or help would be appreciated.
Thanks
perl_seekr :)

2004-11-03 Edited by Arunbear: Changed title from 'Searching in an array of arraya.', as per Monastery guidelines


In reply to Searching in an array of arrays by perl_seeker

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.