in reply to Re: Finding number of lines in STDIN
in thread Finding number of lines in STDIN

More specifically probably something like this (untested):
my $max = 10; my $num = 0; my @lines; while (<STDIN>) { last if ++$num > $max; push @lines, $_; }

Hope this helped.
CombatSquirrel.
Entropy is the tendency of everything going to hell.