my $funcname = ( $someCondition ? 'foo' : 'bar' ); $funcname->($arg1, $arg2);