in reply to print line 5 lines previous to comaprison line!

As others have said, you can just read the whole file in at once, and then be able to access all elements of the array. If you also want to remove newline characters to make the array easier to process, here is a handy one-liner.
chomp(@myArray = <FILEHANDLE>);
Good luck!

Brian - a.k.a. DrSax

Replies are listed 'Best First'.
Re: Re: print line 5 lines previous to comaprison line!
by pmas (Hermit) on Jun 07, 2001 at 19:07 UTC
    If file is really huge, you do not want to read whole file into memory.

    davorg rules!

    pmas