Help for this page

Select Code to Download


  1. or download this
    for my $file (qw(files.txt data.txt)) {
        unlink $file if -f $file;
        die "Unable to unlink '$file': $!" if -e $file;
    }
    
  2. or download this
    for my $file (qw(files.txt data.txt)) {
        unlink $file if -f $file;
        die "Unable to unlink '$file': $!" if -f $file;
    }
    
  3. or download this
    for my $file (qw(files.txt data.txt)) {
        if ( -f $file) {
           unlink $file or warn "Unable to unlink '$file': $!";
        }
    }