Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    $code = 'if($a>$b){';
    ...
    eval $code;
    print $@ if ($@);
    print $result;
    
  2. or download this
    #!/usr/bin/perl
    $code  = 'if($port_a $cmp_op $port_b){$result=1;}';
    ...
    $perl eval
    Scalar found where operator expected at (eval 1) line 1, near "$port_a
    + $cmp_op"
            (Missing operator before $cmp_op?)