Help for this page

Select Code to Download


  1. or download this
    ## which are finally assigned to the array                      ## 4 #
    +#
    my @newest = (
    ...
        ## which it then reduces to just a list of directories
        grep -d, glob '/*'
    )[0..19]; ## then this "list slice" selects the 20 most recent  ## 3 #
    +#
    
  2. or download this
    my @allFilesnDirs = glob '/*';
    
    ...
    my @allDirsSortByDateTime = sort{ -M $a <=> -M $b } @allDirs;
    
    my @newest20 = @allDirsSortedByDateTime[ 0..19 ];