Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modifiers for tr/// #632

Closed
p5pRT opened this issue Sep 20, 1999 · 2 comments
Closed

modifiers for tr/// #632

p5pRT opened this issue Sep 20, 1999 · 2 comments

Comments

@p5pRT
Copy link

p5pRT commented Sep 20, 1999

Migrated from rt.perl.org#1497 (status was 'resolved')

Searchable as RT1497$

@p5pRT
Copy link
Author

p5pRT commented Sep 20, 1999

From The RT System itself

...................
Because the transliteration table is built at compile time,
neither the SEARCHLIST nor the REPLACEMENTLIST are subjected to
double quote interpolation. That means that if you want to use
variables, you must use an eval()​:

  eval "tr/$oldlist/$newlist/";
  die $@​ if $@​;

  eval "tr/$oldlist/$newlist/, 1" or die $@​;
...................

Why don't invent a special modifier for such case? A modifier 'e' seems very
suitable. As well as modifier 'o' to compile once.

Good luck,
Vadim.

@p5pRT
Copy link
Author

p5pRT commented Apr 22, 2003

@iabyn - Status changed from 'stalled' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant