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)) {
    print $line;
}

The defaults are much longer than impatient people who are trying to write
stuff quickly may think :-)  If you set them up as in the above, it should
take only a bit of time to see stuff show up.  The defaults?  Well, 10 or 20
seconds, if not longer.  So:  "perldoc File::Tail" and find all the parameters
and set them up appropriately for your thing....

-- 
Matt G / Dances With Crows
The Crow202 Blog:  http://crow202.org/wordpress/
There is no Darkness in Eternity/But only Light too dim for us to see

---------------------------------------------------
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

Reply via email to