Thx#!perl use strict; use warnings; use File::Find; my @ext = qw(.tmp .bak .$$$ .chk .old .gid .fts .ftg .log .dmp .--- .prv .temp); sub wanted { my $file = $_; map {unlink $file if $file =~ qr/\Q$_\E\z/ and -f $file} @ext; } find(\&wanted, '/');
In reply to Can anyone help me to improve this code, please? by htywky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |