@MLR_file = ; # read in file 1 data $MLR_file[2] =$MLR_file[1] = $MLR_file[0]; # modify it @MLR_file2 = ; #read in set2 data $MLR_file2[2] =$MLR_file2[1] = $MLR_file2[0]; # modify it &printFile (@MLR_file, @MLR_file2); sub printFile { #print the contents of each array to the correct ouput file my @file = $_[0]; my @file2 = $_[1]; foreach $line(@file) { print OUT "$line"; } foreach $line(@file2) { print OUT2 "$line"; } #### ARRAY(0xd3a2c) ARRAY(0xd3a98)