in reply to Help with code for adding two arrays.

Hi fatalserpent

Welcome , i just want to say that you should not assign

the chomp() value to the same variable,

chomp() just removes the new line character, we just have to use

$tdin = <STDIN>; chomp($tdin); $din = <STDIN>; chomp($din);