Web Analytics Made Easy -
StatCounter Replace new lines and tabs - CodingForum

Announcement

Collapse
No announcement yet.

Replace new lines and tabs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Replace new lines and tabs

    Hey everyone,

    I'm trying to open and clean some text files.
    How can I find and replace newlines and tab characters with an empty string.

    Thanks

  • #2
    You can use a regex.
    Code:
    $str =~ s/[\t\n]+//g;

    Comment


    • #3
      thanks

      Comment

      Working...
      X