Help for this page

Select Code to Download


  1. or download this
    # 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";
    }
    
  2. or download this
    if (is_a_safe_sub($op))
    {
        eval "$op($arg)" or warn "Error, blah, blah";
    }