in reply to Re: skip newline charater when reading
in thread skip newline charater when reading

Thanks that did it!
  • Comment on Re^2: skip newline charater when reading

Replies are listed 'Best First'.
Re^3: skip newline charater when reading
by repellent (Priest) on Jan 13, 2009 at 17:51 UTC
    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: