http://www.perlmonks.org?node_id=117988


in reply to Strict, strings and subroutines

Getting into the gross, this does something slightly different from the above solutions. Though called like a function, it will actually do a method search for it:
__PACKAGE__->can("do_$type")->();