Thanks, seems to be doing the trick :)

Very nice module indeed...


-- 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:27 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 don't you use the File::Tail module from CPAN?

http://search.cpan.org/~mgrabnar/File-Tail-0.99.1/Tail.pm


This is unfortunately very expensive on my CPU. Are there any better ways
to go about this??? tail comes to mind, but I'd prefer to do this all in
perl.


--
Chris.

I love deadlines. I especially love the whooshing sound they make as they
fly by..." - Douglas Adams, 'Hitchhiker's Guide to the Galaxy'


--
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>




Reply via email to