Don't forget to chomp the incoming list. Also, if all you do is read the results immediately and use them directly, backticks are simpler.
chomp( my @Files = `ls -1t $LOGSTR` ); die "No files?" if ! @Files;
I agree with the idea of using ls to get a sorted list of files. It's a lot easier than a manual stat and sort (though there's probably a module to do it for you).
In reply to Re^2: Deleting Oldest Logfiles
by kyle
in thread Deleting Oldest Logfiles
by longjohnsilver
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |