Re: RFC 165: Allow variables in a tr///

[email protected] (Tom Christiansen)
Newsgroups perl.perl6.language.regex
Message-ID <10101.967586457@chthon>
>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.

When does the structure get built?  That's why eg. tr[a-z][A-Z] 
brooks no variables, for it is solely at compile time that these
things occur, and why you must resort to delayed compilation via
eval qq/.../ to prod the compiler into building you a new one.o

Maybe you want qt/.../.../ or something.

--tom
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.