in reply to Re^2: concatenating multiple lines without using . operator
in thread concatenating multiple lines without using . operator
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: concatenating multiple lines without using . operator
by jwkrahn (Abbot) on Jun 13, 2012 at 19:36 UTC | |
by NetWallah (Canon) on Jun 13, 2012 at 23:25 UTC | |
|
Re^4: concatenating multiple lines without using . operator
by anonym (Acolyte) on Jun 13, 2012 at 13:54 UTC | |
by NetWallah (Canon) on Jun 13, 2012 at 15:49 UTC | |
by frozenwithjoy (Priest) on Jun 14, 2012 at 05:03 UTC | |
by NetWallah (Canon) on Jun 14, 2012 at 13:58 UTC | |
by frozenwithjoy (Priest) on Jun 16, 2012 at 04:54 UTC |