Also note - since the \s \r .. etc are alternative characters, and NOT a sequence, I have placed them in [brackets].$_ =~ s/[\s\r\n\t]//sg;
From the docs:
s Treat string as single line. That is, change "." to match any character whatsoever, even a newline, which normally it would not match.Update: Ignore the suggestion to use the "s" modifier. It is not necessary. See jwkrahn note below.
I hope life isn't a big joke, because I don't get it.
-SNL
In reply to Re^3: concatenating multiple lines without using . operator
by NetWallah
in thread concatenating multiple lines without using . operator
by anonym
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |