stupid perl question
Matt Graham
danceswithcrows at usa.net
Thu Jun 23 16:34:15 MST 2011
From: "Steven A. DuChene" <linux-clusters at 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
More information about the PLUG-discuss
mailing list