Help for this page

Select Code to Download


  1. or download this
    use Math::Symbolic qw/parse_from_string/;
    
    ...
    my $value;
    eval { $value = $ms->value() };
    if ($@) {...} # catch execution errors
    
  2. or download this
    # parse...
    
    ...
    my $value;
    eval { $value = $ms->value() };
    if ($@) {...} # catch execution errors
    
  3. or download this
    # parse...
    
    # note the parens for list context
    my ($coderef) = $ms->to_sub();
    my $value = $coderef->();