Help for this page

Select Code to Download


  1. or download this
    use File::stat;
    ...
    ...
    @allPictures = sort {
      ($m{$a} ||= stat($a)->mtime) <=> ($m{$b} ||= stat($b)->mtime)
    } @allPictures;
    
  2. or download this
    my %m;
    @allPictures = sort {
      ($m{$a} ||= -M $a) <=> ($m{$b} ||= -M $b)
    } @allPictures;