The usual way to do that in Perl is:
s/\n//g, s/\s+//g for $var;
But that is really redundant as \n is part of the character class \s so just doing:
$var =~ s/\s+//g
Would accomplish the same result.
In reply to Re: Multiple Search and Replace in Single Line
by jwkrahn
in thread Multiple Search and Replace in Single Line
by perl@1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |