Don't ask to ask, just ask | |
PerlMonks |
Selecting a particular record from groups of recordsby msexton (Initiate) |
on Sep 20, 2012 at 13:08 UTC ( [id://994658]=perlquestion: print w/replies, xml ) | Need Help?? |
msexton has asked for the wisdom of the Perl Monks concerning the following question: 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
Back to
Seekers of Perl Wisdom
|
|