in reply to Re: Print 4 Lines below matching criteria
in thread Print 4 Lines below matching criteria

I tend to use scalar file reads when appropriate so as to avoid temporary variables so I would write your

for (1 .. 4) { my $following = <DATA>; print $following; }

like this

print scalar <DATA> for 1 .. 4;

It just looks a little cleaner to me.

Cheers,

JohnGG