You can use chomp to remove the new lines from your input
In reply to Re: Problem with a new line by spivey49 in thread Problem with a new line by jinnks