On Tue, Jul 3, 2012 at 6:01 AM, Ed Avis <perlbug-followup@perl.org> wrote: > > I suggest a variant which performs the substitution and returns > either the new string, or undef if no match. Suppose the modifier > /R is used for this purpose. Then Yes, but what if the original string was undef? (warnings aside) We can't use a value to signal an exception in a function that takes a value and returns a value. Even if semantics could be worked out (die unless match?) I agree with Ricardo that it's not worth another modifier. I do think the documentation might need to reflect this issue and perhaps add the suggestion to do it the old way if the success of the match is important. -- DavidThread Previous