An alternative to eval is pretending the name is a coderef:
I'll leave the benchmarking to you.{ no strict 'refs'; my $subname = "subby${var1}_text_${var2}"; $subname->(); }
In reply to Re: Calling subroutines based on variable names...
by rhesa
in thread Calling subroutines based on variable names...
by cosmicperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |