Both those forms are more complex than they need be:
$h{test} = sub{ print 'hi' };; $h{test}();; $p = \%h;; $p->{test}();; hi
In reply to Re^2: Subroutines in Dispatch Tables
by BrowserUk
in thread Subroutines in Dispatch Tables
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |