It's only getting compiled once, just as if it was outside of eval, so what's the problem?
If you wanted to reuse the counter, make a sub if it:
$counters{$_} = eval "sub { \$_[0] =~ tr/\Q$_\E// }";
In reply to Re^3: Simple Matching
by ikegami
in thread Simple Matching
by rnroot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |