> Would there be any interest in adding these two ideas to this RFC:
>
> 1) tr is not regex function, so it should be regularized to
>
> tr(SEARCH, REPLACE, MOD, STR)
MOD should be last, because you're frequently going to want to omit MOD.
But I think this is worth discussing further, because it neatly
accomplishes the goal of the RFC in a straightforward way:
tr('a-z', 'A-Z', $str)
replaces a-z with A-Z, and
tr($foo, $bar, $str)
replaces the characters from $foo with the characters from $bar.
No special syntax is necessary.
People might even stop writing things like
tr/[a-z]/[A-Z]/
if we did that.
- Re: RFC 165: Allow variables in a tr/// Stephen P. Potter
- Re: RFC 165: Allow variables in a tr/// Mark-Jason Dominus
- Re: RFC 165: Allow variables in a tr/// Nathan Wiger
- Re: RFC 165: Allow variables in a tr/// Tom Christiansen
- Re: RFC 165: Allow variables in a tr//... Nathan Wiger
- Re: RFC 165: Allow variables in a tr/// Tom Christiansen
- Re: RFC 165: Allow variables in a tr/// Mark-Jason Dominus
- Re: RFC 165: Allow variables in a tr//... Tom Christiansen
- Re: RFC 165: Allow variables in a... Mark-Jason Dominus
- Re: RFC 165: Allow variables in a tr/// Stephen P. Potter
- Re: RFC 165: Allow variables in a tr/// Tom Christiansen
- Re: RFC 165: Allow variables in a tr/// Stephen P. Potter
