while(<$fastd> ) { chomp; my @numbers = split; push @matrix, \@numbers; }