##
#!/usr/bin/perl -w
use strict;
use warnings;
system("rm dir/FILE:*");
my $err = $?;
print "Error is $err\n";
# Output is:
rm: cannot remove ‘dir/FILE:*’: No such file or directory
Error is 256
##
##
#!/usr/bin/perl -w
use strict;
use warnings;
foreach my $file (glob("dir/FILE:*")) {
if (!unlink($file)) {
print "Warning: failed to remove file '$file' ($!)\n";
}
}