Help for this page

Select Code to Download


  1. or download this
        open my $fh, "<", $file or warn "Couldn't open '$file': $!" and ex
    +it;
    
  2. or download this
    my $file = "does-not-exist";
    
    ...
        };
        print STDERR "ERROR: $@" if $@;
    }
    
  3. or download this
    while (<STDIN>) {
        eval {
    ...
        };
        print STDERR "ERROR: $@" if $@;
    }
    
  4. or download this
    ERROR: Couldn't open 'does-not-exist': No such file or directory at ./
    +680735.pl line 10, <STDIN> line 1.
    
    ERROR: Couldn't open 'does-not-exist': No such file or directory at ./
    +680735.pl line 10, <STDIN> line 2.
    ...