in reply to only list recent files
Now you can sort on the second element of the array references. The reason I multiply the return value of the modification time is because it returns the time in days. So I turn that into hours.opendir DIR, $path or die "can't open $path: $!"; while (defined(my $f = readdir DIR)) { push @ok, [ "$path/$f", -M _ ] if (24 * -M "$path/$f") <= 2; } closedir DIR;
|
|---|