in reply to (ichimunki) suggestion regarding Perl-ized 'ls -lrt'
in thread Reading from ls-lrt (was: Reading)

I presume that files beginning with a dot where still eligable for transfer as he didn't say anything about that. But if he's mirroring an FTP site, I suppose a
next if $x=~/^\./;
would be appropriate (and take care of the directory stuff).
You be right, ichimunki, by using the example of 'ls -ltr', it doesn't include dot files ;)

Replies are listed 'Best First'.
(ichimunki): Perl-ized 'ls -lrt' getting it exactly
by ichimunki (Priest) on Feb 05, 2001 at 20:59 UTC
    Actually, he is using 'ls -lrt'. If I'm not mistaken this will not display .files in the list, so we need that. I'd rather not include any invalid files in my sort process to begin with, hence my suggestion. In fact, if we start out with the correct file list and sort it based on stat, then we just need to do @return_list = @sort_list[0..4] without looping through the list at all.