Help for this page

Select Code to Download


  1. or download this
    for my $file (qw(files.txt data.txt)) {
        unlink($file)
            or $!{ENOENT}
            or die("Unable to unlink '$file': $!");
    }
    
  2. or download this
    my $success = 1;
    for my $file (qw(files.txt data.txt)) {
    ...
    }
    
    die("Unable to cleanup") if !$success;