in reply to Problem with a new line

You can use chomp to remove the new lines from your input