howabout 
while (<FILE>) {
        next unless /^NC00/;
        push @required , $_;
}

On Fri, Nov 16, 2001 at 03:42:59PM -0500, [EMAIL PROTECTED] shaped the 
electrons to read:
> Hello All, 
> This appears to be quite simple, but yet the answer has eluded me. 
> I can/kow how to use a foreach loop to pull one line from a file. But what 
> I am trying to do is this.
> I have a file that has about 200 lines of junk and about 10 lines that I
> really 
> need. Some thing that looks like this
> .... 
> Assigned To+ 
> .... 
> 11/14/2001 06:52:42 PM 
> 1/2 
> Ticket ID+ 
> Priority 
> S 
> Problem Summary 
> Assigned To+ 
> Status 
> A 
> A 
> NC000012345678 
> P03 
> OM: This is a test 
> Test test 
> Work In Progress 
> 0 
> 0 
> K!<3'!!<3'!!<3'!!<3'!!<3'!!<3'!!<3'!!<3'!
> What I want to do is scroll thru the file and when it finds the line that
> starts 
> with "NC00" print that line and the next 5 lines. If you can help out in
> any way 
> I would greatly appreciate it.
> Thanks,
> Dave
> 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to