Because I need to do it similarly to tail.
using just the while, the loop will exit at the end of the file. I need it to wait at the end of the file untill new data is appended to the end of it.
-- Chris.
I love deadlines. I especially love the whooshing sound they make as they fly by..." - Douglas Adams, 'Hitchhiker's Guide to the Galaxy'
----- Original Message ----- From: "Joshua Colson" <[EMAIL PROTECTED]>
To: "Chris Knipe" <[EMAIL PROTECTED]>
Sent: Monday, May 02, 2005 7:18 PM
Subject: Re: expensive loops
On Mon, 2005-05-02 at 19:10 +0200, Chris Knipe wrote:Hi,
open (LOG, '<'.LogFile); for (;;) { while (<SQUIDLOG>) { # Do stuff here } } }
Why wouldn't you just use:
open(LOG, "<".LogFile); while (<LOG>) { # Do stuff here }
-- Joshua Colson <[EMAIL PROTECTED]> Sr. Systems Administrator Giant Industries, Inc P: (480) 585-8714 F: (480) 502-6641
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>