use strict; use warnings; my $sub = 'foo'; my @result_set = Dispatch->$sub( qw/bar baz/ ); package Dispatch; sub foo { shift; print @_,"\n"; }