You should always use strict; (and use warnings; too). Having said that, you can turn strict off locally, for only that tiny bit of code that needs it:
use strict; { # limit scope of "no strict" to this block no strict 'refs'; &{ $sub_routine } ($value1, $value2); }
Although I personally like the dispatch table better.
In reply to Re: subroutine ref while "strict refs"
by Anonymous Monk
in thread subroutine ref while "strict refs"
by viffer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |