$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:
my $retval = $arch{$type}->("some stuff");
Update: You may also find Implementing Dispatch Tables helpful (from our Tutorials section).
In reply to Re: return data from a subroutine reference...
by bobf
in thread return data from a subroutine reference...
by abachus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |