http://www.perlmonks.org?node_id=368934


in reply to Can anyone help me to improve this code, please?

A simpler approach would be to use File::Find::Rule
my @ext = map "*.$_", qw( .tmp .bak .$$$ .chk .old .gid .fts .ftg .log .dmp .--- .prv .temp ); unlink find(file => name => \@ext, in => '/');
See. unlink and File::Find::Rule for more info.
HTH

_________
broquaint