in reply to Variables in extended patterns?
Considering that
doesn't contain any literal whitespace, the use of /x isn't quite needed. Furthermore, since you don't have a dot, there's no need for /s. And the absence of ^ and $ anchors make the /m superfluous as well.s{$CR?$LF}
Now, if you have a modern Perl (say, one released last year, like 5.10), you could write:
instead.s/\R/\n/g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Variables in extended patterns?
by flamewise (Initiate) on Nov 05, 2008 at 16:19 UTC | |
by JavaFan (Canon) on Nov 05, 2008 at 17:56 UTC | |
by Anonymous Monk on Nov 06, 2008 at 03:17 UTC |