I'm not sure if this is fastest but it is the shortest and sweetest way. It uses perl style code rather than C style.
This is 150% faster than your C style method, see this
use Data::Dumper; while(<DATA>){ push @matrix, [split/\s+/]; } print Dumper(\@matrix); __DATA__ 1 2 3 4 5 6 7 8 9 10 11 12
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: Fast Matrix Load
by tachyon
in thread Fast Matrix Load
by Evanovich
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |