Help for this page

Select Code to Download


  1. or download this
    my $foo = eval {
        my $bar = baz();
    ...
    }
    __END__
    baz failed!
    
  2. or download this
    Can't modify constant item in scalar assignment at (eval 1) line 1, at
    + EOF
    
  3. or download this
    sub baz {
        my $result = eval "1 = 2";
        die $@ if $@;
        $result;
    }