Based on your statement "on each encountered date run spcial sub to process each date input," it sounds to me like when you build your dataset, you should consider putting it into a hash. Have your keys be the actual data you want to juggle. You can then give the value for each key a "datatype" of DATE, NAME, AGE, etc.

-pseudoexplanation of hash NOT PROPER CODE-
my %Data; $Data{'Bob'} = "NAME"; $Data{'1234 Perl Way'} = "ADDRESS"; $Data{'5'} = "AGE"; $Data{'1/2/02'} = "DATE"; $Data{'3/4/02'} = "DATE";
and so on

I will admit, it is pretty crude, and counts on the fact that you know what data is going into the set, but hey, it would work for what you want, and it would be relative easy to iterate over.

Oh, and it is likely to be viewed as a backwards way to use a hash. hee hee


In reply to Re: simple array condition by Silicon Cactus
in thread simple array condition by Anonymous Monk

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.