I altered the line "chomp $in2[2];" to read "chomp $in2[1];"