Next Trivial Utilities 153

unrecv

        foreach $file (@ARGV) {
          next unless -f $file;
          next if -l $file;
          unless (open IN, "< $file") {
            warn "Couldn't open file `$file' for reading: $!;
            skipping.\n";
            next;
          }
          unless (unlink $file) {
            warn "Couldn't remove file `$file': $!; skipping.\n";
            next;
          }
          unless (open OUT, "> $file") {
            warn "Couldn't open file `$file' for writing: $!;
            skipping.\n";
          }



Next Menu Copyright © 2012 M. J. Dominus