htywky has asked for the wisdom of the Perl Monks concerning the following question:
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, '/');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can anyone help me to improve this code, please?
by tachyon (Chancellor) on Jun 23, 2004 at 01:22 UTC | |
by ihb (Deacon) on Jun 23, 2004 at 01:55 UTC | |
|
Re: Can anyone help me to improve this code, please?
by Zaxo (Archbishop) on Jun 23, 2004 at 02:21 UTC | |
|
Re: Can anyone help me to improve this code, please?
by broquaint (Abbot) on Jun 23, 2004 at 03:27 UTC | |
|
Re: Can anyone help me to improve this code, please?
by etcshadow (Priest) on Jun 23, 2004 at 01:58 UTC |