I wrote:
> Try this:
>
> my $N = 10;
> my $regex = shift;
> my @buffer = ();
>
> while (<>) {
> push(@buffer, $_);
> next if $. < $N * 2;
> if ($buffer[$N] =~ /$regex/) {
> print "@buffer\n";
> }
> }I just noticed I forgot to put in the "shift @buffer;" after the "print". Oops. :-P -- John Abreau / Executive Director, Boston Linux & Unix ICQ 28611923 / AIM abreauj / JABBER [EMAIL PROTECTED] / YAHOO abreauj Email [EMAIL PROTECTED] / WWW http://www.abreau.net / PGP-Key-ID 0xD5C7B5D9 PGP-Key-Fingerprint 72 FB 39 4F 3C 3B D6 5B E0 C8 5A 6E F1 2C BE 99 "The early bird catches the worm, but the second mouse gets the cheese."
msg01885/pgp00000.pgp
Description: PGP signature
