in reply to Delete multiple files with a pattern

no such thing really, either you can delete it, or you can't
use autodie; open my($fh), q/>/, 2; flock $fh, 2; eval { unlink 2; } or warn $@; close $fh; unlink 2; unlink 2; __END__ Can't unlink('2'): Permission denied at - line 4 Can't unlink('2'): No such file or directory at - line 7