On Tue, 30 Dec 2003 19:07:26 -0800
"Perl" <[EMAIL PROTECTED]> wrote:
> $iisdir = '\\\server01\c$\winnt\system32\logfiles\W3SVC1';
> opendir LOGS, "$iisdir" or die "Directory error for IIS LOGS: $!\n";
>
> my @files = grep /\.log$/, readdir LOGS;
> @files = sort { -M $a <=> -M $b } @files;
> $active_log = $files[-1]; # this should be the newest file rather than
> a log in the local directory that the script is running from.
I was unable to duplicate your problem. Made 5 files 1.log .. 5.log that order and in
a faraway directory, and then 6.log in the working directory.
"5.log" came up every time
--
Owen
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>