http://qs321.pair.com?node_id=448165


in reply to Re^4: splitting arrays
in thread splitting arrays

if newlines are considered part of the data:
(untested)
{ local $/="\t"; my $i = 0; my @arr = (); while ( <FILE> ) { push @{$arr[$i++%50]}, $_; } }
This should (note that the code is untested) give you an array of array references that each contain 50 items (except possibly the last array ref).

Does that do what you wanted?
--------------
"But what of all those sweet words you spoke in private?"
"Oh that's just what we call pillow talk, baby, that's all."