Help for this page

Select Code to Download


  1. or download this
    opendir my $d, $dir or die "Can't readdir $dir: $!";
    my @files =
    ...
      @files;
    
    unlink @sorted[ 0, 1 ] if @sorted > 20;
    
  2. or download this
    my @sorted = sort { -M $b <=> -M $a } @files;