Adam D. Lopresto wrote:
Really what I've been wishing for was an operator (or whatever) to let me do an s// without changing the variable.
I would hope/expect that that's what the subroutine form of C<s> would do.
That is, it takes a string, a pattern, and a replacement string, and returns a new string with substitution performed (without affecting the original string): print 'He said "$( s($statement,/\.$/,"") )", but we didn't believe him.'; Damian