Hi,

I have a question, but don't know what to Google for help or even which part of the Perl manual to read.

Basically I have a file that consists of a number of records. Each record has a date/time entry, a latitude, longitude, a water depth and a number of flags. The file comes from a multibeam bathymetry export. The problem is that the date/time stamp is the same on a number of records and I want to chose one of these dependant upon one of the flags.

So I may have 30 records with the same date/time stamp (the number of records is not fixed for each date/time). Each of these records has a particular latitude, longitude and water depth, one of the QC flags however determines the record I want (it has the smallest value for that date/time). Unfortunately this value is not fixed. It is just the minimum value for that date/time. I wish to output that record.

I then move onto the next date/time group (will be around 30 records, but could be slighty higher or lower) and repeat the process.

This continues until the end of the file.

I really only need to be pushed in the right direction (I hope). I dont have a sample of the data with me, but can provide some tomorrow when I am at work.

Any guidance would be much appreciated.

Thanks

Mike Sexton


In reply to Selecting a particular record from groups of records by msexton

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.