I've an array of strings with some elements which have a newline character at the end. I tried removing the new line character by looping over the array and chomping the element. But instead of removing the \n the whole element is removed. Same thing happens when i do a s/\n// or a tr/\n// can anybody tell me if i'm missing something here. Thanks in advance.