The Perl doc states:
e Evaluate 'replacement' as an expression
r Return substitution and leave the original string untouched.
are available flags to be used in replacement patterns. When I pass the r flag to my substitution pattern, it gets interpreted as a syntax error. I am running Perl 5.8.8. Is it possible it is not supported in my version of Perl? Also, can someone provide a working example of how to use the flag and how to call the newly created replacement?
Perhaps you should be reading the docs for 5.8.8, then? /r was added to 5.14!
In 5.8.8, you can do the equivalent of
with
Sample usages of s///r: