Ladies and Gentlemen:

I'm using a while loop to search for specific record. 
If I find the record, then I need to report that record and the trailer
record.
I'm not slurping the file into memory so I can't use $openfile[$#openfile]
approach. 

Here's what I have:

while (<FILE>) {
if (/searchpattern/) {
print $_ ;
## Now here is where I also need to print the last record.
##  I also need to search the whole file for multiple occurrences of the
pattern.
## I don't have the File::Readbackwards module.
} 

For what its worth, I know that my trailer record has identifying marks in
the first 3 bytes.
Any suggestions?

Thanks,

Frank



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

Reply via email to