in reply to Re: Unix - Keep the last modified file in the directory and move/copy the rest of the files.
in thread Unix - Keep the last modified file in the directory and move/copy the rest of the files.
readdir doesn't prepend the SRC directory to the filename for you, so if your cwd is not the source directory, you will get strange results from that code.my @files = sort { -M $a <=> -M $b } readdir SRC;
Makeshifts last the longest.
|
|---|