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 the

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 linux-clust...@mindspring.com wrote: I am attempting to do a tail -f on a log

Re: stupid perl question

2011-06-23 Thread Steven A. DuChene
2011 4:21 PM To: Main PLUG discussion list <plug-discuss@lists.plug.phoenix.az.us>, "Steven A. DuChene" <linux-clust...@mindspring.com> 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 fr

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

Re: stupid perl question

2011-06-23 Thread Matt Graham
From: Steven A. DuChene linux-clust...@mindspring.com 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)) {