there is a 'limit' arg to split (see perldoc -fsplit) this could do what you want:
Cheers, Christophuse warnings; use strict; use Data::Dumper; my @rows; while (<DATA>) { my @data = split(/ /,$_, 6); push (@rows, \@data); } print Dumper \@rows; __DATA__ abc 322 2/3/09 aaa aadda dasdas a1 a2 a3 def 433 3/4/08 dasd bdbdbd wings b1 b2 b3 b4 b5
In reply to Re: Optimizing Splitting of Array
by lamprecht
in thread Optimizing Splitting of Array
by bichonfrise74
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |