When you mentioned that you wanted these "lines" to be "concatenated", what's the delimiter? In other words, what do you want to join them with?
The trick is to translate all embedded
"\n" to the delimiter of your choice. If the delimiter is a single character, you don't really need to use a full-on
s///.
If you wanted the delimiter as nothing:
s/[\n\r]//g; # suggested by moritz
tr/\n\r//d; # does the same
If you wanted the lines to be joined by horizontal space:
tr/\n\r/ /;