Re: Getting the most recent file

2003-12-15 Thread victor
using the readdir beforehand make this possible? -Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED] Posted At: Saturday, December 13, 2003 6:27 AM Posted To: Perl Conversation: Getting the most recent file Subject: Re: Getting the most recent file [EMAIL PROTECTED] wrote: I am

RE: Getting the most recent file

2003-12-14 Thread Paul Harwood
At: Saturday, December 13, 2003 6:27 AM Posted To: Perl Conversation: Getting the most recent file Subject: Re: Getting the most recent file [EMAIL PROTECTED] wrote: I am trying to write some code to read the most recent log file in a directory. I wrote some code below. This works but I was wondering

Re: Getting the most recent file

2003-12-14 Thread Rob Dixon
Paul Harwood wrote: One question I have: With this statement: @files = sort { -M $a = -M $b } @files; How does Perl understand that these are files and not just text entries? Did using the readdir beforehand make this possible? Well they /are/ just text entries! But ones that correspond

Getting the most recent file

2003-12-13 Thread Perl
I am trying to write some code to read the most recent log file in a directory. I wrote some code below. This works but I was wondering if there was a more efficient method to do this. Ideally I would like to include hours, minutes and seconds but that's not necessary at this point. --Paul

Re: Getting the most recent file

2003-12-13 Thread Rob Dixon
[EMAIL PROTECTED] wrote: I am trying to write some code to read the most recent log file in a directory. I wrote some code below. This works but I was wondering if there was a more efficient method to do this. Ideally I would like to include hours, minutes and seconds but that's not necessary