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


in reply to call sub in string

Perl6 will provide an easier way to achieve this by:
"$(function_$i)"
I would anyway suggest to code this better as:
for ( 1..2 ) { function( $i ) }
and process the different values in the function.