hi..

I am using another script to create a load of comma delimited files that contains a quote and a time ..they are created every half hour... an example of one file '11-03-08-2pm.txt'

1.53311 ,1:59:52 1.53311 ,1:59:5220 1.53311 ,1:59:52 1.53311 ,1:59:52hi 1.53311 ,2:00:00 1.53306 ,2:00:03 1.53307 ,2:00:06
what i want to do is grab the quote at 00 seconds or the one closest to but not after the half hour mark.. e.g 1:29:54 could be used if i have no quote for 1:30:00 , i wouldnt use 1:30:01 even tho its closer.

there can be some vagaries in the readings file e.g 1:59:52hi , i can dismiss any data after the seconds reading.

i will then save only that selected quote back to its file.

does anyone care to nudge me in the right direction here pls? its been a while since i have had a need for any perl and my skills are little rusty to say the very least and i am drawing somewhat of a blank.

thanks kindly for any input ..

conal.

In reply to reading a delimited file and selecting values from it by Conal

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.