in reply to Removing empty line(s) with regex in a multiple strings in a variable

It looks like you want:
$str =~ tr/\n//s;
  • Comment on Re: Removing empty line(s) with regex in a multiple strings in a variable
  • Download Code

Replies are listed 'Best First'.
Re^2: Removing empty line(s) with regex in a multiple strings in a variable
by choroba (Cardinal) on Apr 27, 2010 at 15:48 UTC
    Does not work for me. But tr/\n//d or s/\n//g work.