in reply to Style question: symref or eval?
Well, I'd strongly discourage the use of stringy eval for this. The only point I'll conceed in favor of it is that it is probably easier to understand by people who aren't qualified to maintain your code. If you want to trap dieing code, then wrap blocky eval around the code in question.
Also note that you'd want eval "$op(\$arg)" instead of what you wrote.
In the spirit of DIMTOWDIT, you can also do:
- tye (but my friends call me "Tye")@_= ($arg); goto &$sub;
|
|---|
| Replies are listed 'Best First'. |
|---|