in reply to string variable merge issue
You probably want to chomp your data to get rid of the newlines.