On Tue, 11 Jun 2002, Wizard wrote:

> open( FH, "file.txt" )
> 
> while( <FH> ) { # Same as while( $_ = <FH>)
>     &do_something();
> }

But this won't solve the original problem, which was how to write a
Perl script that provides N lines of context before and after a 'grep' match.
Your program processes each line one at a time, and doesn't store a
buffer of lines. 

--
Ron Newman       [EMAIL PROTECTED]
URL: http://www2.thecia.net/users/rnewman/

Reply via email to