in reply to Creating a String

Well, we can't see what you have in @icpList, but I would guess that you may wish to chomp($icp) before you include it in your string, to remove any trailing \n character that might be there. Or perhaps even run it through a substitution regex to strip off any leading spaces or return characters, something like this (untested): $icp =~ s/^\s+(.*?)\s+$/$1/;

No good deed goes unpunished. -- (attributed to) Oscar Wilde