in reply to Creating a String

Probably because the elements in @icpList array contains new line character. Try this before the cycle:
map{ s/\n//g }@icpList;