open FILE, "output.txt"; undef (@matrix); while (){ push @matrix, [split]; } &dataconvert; # this is where it branched off to #change up the data select OUTP; for $i (0.. ($#matrix)){ print "@{$matrix[$i]} \n"; }