while () { my $line = $_; @push @lineinfo, split $line; my $length = @lineinfo; print "LEN: $length\n"; @lineinfo = (); }