for( my $i = 0; $i < 1_000_000; $i++ ) { print join ' ', map { int rand 256 } 0 .. 50; print "\n"; } #### my @d; $#d = 1_000_000; # presize the array! my $i = 0; while (<>) { chomp; $d[$i++] = [ split ]; } #### $d[$i++] = [ map { int $_ } split ];