Help for this page

Select Code to Download


  1. or download this
    use strict;
    my $num = 1;
    print "Surprise!\n" if (!defined(eval { $num++; return;}));
    print "$num\r\n";
    
  2. or download this
    use strict;
    my $num = 1;
    eval { $num++; return;};
    print "Surprise!\n" if ($@);
    print "$num\r\n";