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.
In reply to Re^2: Unix - Keep the last modified file in the directory and move/copy the rest of the files. (common readdir trap)
by Aristotle
in thread Unix - Keep the last modified file in the directory and move/copy the rest of the files.
by hyliau
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |