# Suppose $op is the name of the sub, # and $arg is the argument string to pass to it. if (is_a_safe_sub($op)) { no strict 'refs'; $op->($arg) or warn "Error, blah, blah"; } #### if (is_a_safe_sub($op)) { eval "$op($arg)" or warn "Error, blah, blah"; }