- or download this
opendir my $d, $dir;
- or download this
my @f = sort { -M $b <=> -M $a } readdir $d;
- or download this
my @file_list = sort { -M $b <=> -M $a }
grep -f, readdir $dir_handle;
- or download this
unlink @f[-0,1] if @f > 20;
- or download this
use File::Spec 'catfile';
unlink map catfile($dir, $_), @f[0,1]
if @file_list > 20;
- or download this
use File::Spec 'catfile';
...
unlink map catfile($dir, $_), @f[0,1]
if @file_list > 20;