more useful options | |
PerlMonks |
Re: return data from a subroutine reference...by bobf (Monsignor) |
on Aug 12, 2006 at 07:43 UTC ( [id://567011]=note: print w/replies, xml ) | Need Help?? |
$arch{$type}->("some stuff") simply calls the subroutine (see perlref), so you can capture the return value from it just as you would any other subroutine:
Update: You may also find Implementing Dispatch Tables helpful (from our Tutorials section).
In Section
Seekers of Perl Wisdom
|
|