Re: stupid perl question

2011-06-23 Thread Matt Graham
From: "Steven A. DuChene" > I really didn't think something like this would be that hard in perl. :-) use File::Tail; $file = File::Tail->new( name=>"/home/mhgraham/bin/power_input_stuff.txt", maxinterval=>5, interval=>1, tail=>-1 ); while (defined(my $line = $file->read)) { print $line; } T

Re: stupid perl question

2011-06-23 Thread der.hans
Am 23. Jun, 2011 schwätzte Steven A. DuChene so: moin moin, heading out right now, so can't be detailed. Check autoflush. HANDLE->autoflush(EXPR) $OUTPUT_AUTOFLUSH $| If set to nonzero, forces a flush right away and after every I don't remember which CPAN module I us

Re: stupid perl question

2011-06-23 Thread Steven A. DuChene
PLUG discussion list , "Steven A. DuChene" Subject: Re: stupid perl question Is there a reason the log scraper needs to be done in perl? There is autility that will read log files from the end called tac. Maybe it willhelp.Just a thought.KevinOn Jun 23, 2011 5:17 PM, "Steven A. D

Re: stupid perl question

2011-06-23 Thread Kevin Fries
Is there a reason the log scraper needs to be done in perl? There is a utility that will read log files from the end called tac. Maybe it will help. Just a thought. Kevin On Jun 23, 2011 5:17 PM, "Steven A. DuChene" wrote: > I am attempting to do a "tail -f" on a log file that has a new line ad

stupid perl question

2011-06-23 Thread Steven A. DuChene
I am attempting to do a "tail -f" on a log file that has a new line added to it every 15 seconds. I need to parse and process each new line as it is added to the file. I am trying to use the following example code from cpan to see if the basic concept will work using File::Tail but when I run th