NodeReaper has asked for the wisdom of the Perl Monks concerning the following question:

This node was taken out by the NodeReaper on May 02, 2011 at 23:15 UTC

Replies are listed 'Best First'.
Re: Perl RegEx
by JavaFan (Canon) on May 02, 2011 at 21:38 UTC
    In the upcoming 5.14, you can do
    $var = ($var =~ s/\n//gr) =~ s/\s+//gr;
    Note that for your particular case,
    $var =~ s/\s+//g;
    will do, as newlines are whitespace.
Re: Perl RegEx
by wind (Priest) on May 02, 2011 at 21:37 UTC
      Is there a point in that?
      $var =~ s/\s+//g;