in reply to Re: Substitution problem.
in thread Substitution problem.

Indeed, so that one would want to use:
eval("tr/$from/$to/");
More and more the only place I end up using eval is in this type of construction.

Replies are listed 'Best First'.
Re (tilly) 3: Substitution problem.
by tilly (Archbishop) on Nov 25, 2000 at 20:08 UTC
    I hope neither $from or $to have a / in them...

    I actually use eval for quite a few things. For instance I may want to turn a template into code and then eval that. But for "quick-n-dirty" I don't reach for it with the obvious exception of the /e modifier for substitutions.

      Got me AGAIN. You are correct, sir. I'll never get all this perl stuff straight in my head!