1 ffd9a51f 2023-08-04 jrmu #!/usr/bin/perl
3 ffd9a51f 2023-08-04 jrmu # Write a program that works like rm, deleting any files named on
4 ffd9a51f 2023-08-04 jrmu # the command line. (You dont' need to handle any of the options of
8 ffd9a51f 2023-08-04 jrmu use warnings;
13 ffd9a51f 2023-08-04 jrmu if (scalar(@ARGV) == 0) {
14 ffd9a51f 2023-08-04 jrmu die "Usage: $0 file ...";
16 ffd9a51f 2023-08-04 jrmu foreach (@ARGV) {
17 ffd9a51f 2023-08-04 jrmu unlink $_ or warn "Unable to delete '$_': $!";