Better to avoid having to make multiple passes if you can. This seems to fit the spec as presented.

#! perl -slw use strict; my( $lo, $hi ) = ( 700, 1200 ); my %seen; while( <DATA> ) { if( m[,...\s(\S+)\s\S+,..bn(\d+)] and $2 >= $lo and $2 <= $hi and not exists $seen{ $2 } ) { print "$2 - $1"; $seen{ $2 }++; } } __DATA__ spokanebase,Wed 24Sep03 17:59:19,50bn4575,88383 bytes spokanebase,Wed 24Sep03 17:59:17,49bn4196,88383 bytes spokanebase,Wed 24Sep03 17:59:10,48bn4550,88383 bytes memphisbase,Wed 24Sep03 17:59:08,27bn700,88383 bytes memphisbase,Wed 24Sep03 17:59:03,26bn5444,88383 bytes havrebase,Wed 24Sep03 17:58:46,20bn5285,88383 bytes havrebase,Wed 24Sep03 17:58:41,19bn4594,88383 bytes alliancebase,Wed 24Sep03 17:58:56,45bn5640,88383 bytes havrebase,Wed 24Sep03 17:58:46,20bn5285,88383 bytes havrebase,Wed 15Sep04 17:58:41,19bn1100,88383 bytes

Output:

c:\test>junk8 700 - 24Sep03 1100 - 15Sep04

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Re: Using a Range to Parse a file and pull out Data? by BrowserUk
in thread Using a Range to Parse a file and pull out Data? by batcater98

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.