The /r modifier for the tr/// and s/// operators has been added in version 5.14, see the perl 5.14 delta
Edit: you don't need it though, without /r $string =~ s/search/rep/; will apply its modifications directly on $string. The /r modifier is used to keep the original string intact and output the result to another one.
In reply to Re: problem with perl 5
by Eily
in thread problem with regex in perl script intended for 5.20,but while running on 5.10
by praveenchappa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |