You might need to wait until Perl 6 for this functionality.
This fortnight on Perl 6, week ending 2003-11-23
I have the feeling that what's actually going to happen is that we'll end up with a supplementary, non destructive form of s/// which doesn't alter the original string, but returns a new string with the substitutions made.
In reply to Re: Non-destructive string substitution
by EdwardG
in thread Non-destructive string substitution
by Sprad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |