in reply to Multiple Search and Replace in Single Line
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.
|
---|