in reply to Can anyone help me to improve this code, please?
A simpler approach would be to use File::Find::Rule
See. unlink and File::Find::Rule for more info.my @ext = map "*.$_", qw( .tmp .bak .$$$ .chk .old .gid .fts .ftg .log .dmp .--- .prv .temp ); unlink find(file => name => \@ext, in => '/');
HTH
_________
broquaint
|
---|
In Section
Seekers of Perl Wisdom