in reply to Re^2: map and regexp. An newbie question
in thread map and regexp. An newbie question
Did you try that?
The /r modifier (Perl 5.14) only solves one of the problems (it doesn't alter the original). It doesn't solve the second problem that the $_ =~ s/a/X/gr construct is not being evaluated in list context, and therefore returns the number of substitution matches, not the modified string.
Apparently I didn't. ;) -- lousy excuse in a followup node below.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: map and regexp. An newbie question
by anneli (Pilgrim) on Oct 19, 2011 at 07:11 UTC | |
by davido (Cardinal) on Oct 19, 2011 at 07:21 UTC | |
by anneli (Pilgrim) on Oct 19, 2011 at 07:50 UTC | |
by davido (Cardinal) on Oct 19, 2011 at 08:01 UTC |