Blob
1 #!/usr/bin/perl3 # Write a program that works like rm, deleting any files named on4 # the command line. (You dont' need to handle any of the options of5 # rm)7 use v5.24;8 use warnings;9 use strict;10 use utf8;11 use Cwd;13 if (scalar(@ARGV) == 0) {14 die "Usage: $0 file ...";15 }16 foreach (@ARGV) {17 unlink $_ or warn "Unable to delete '$_': $!";18 }