in reply to Uninitialized value in concatenation

$input=~ tr/\"//; $input=~ tr/\'//;

You are replacing the " character with itself and the ' character with itself. If you want to delete characters you have to use the /d option:

$input=~ tr/"//d; $input=~ tr/'//d;