From 5133691b574b4cca3f930475b2e05c091162c3f9 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 2 Aug 2004 05:06:00 +0000 Subject: perl_checker cleanup --- perl-install/standalone/logdrake | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'perl-install/standalone/logdrake') diff --git a/perl-install/standalone/logdrake b/perl-install/standalone/logdrake index de563c262..748cb208c 100755 --- a/perl-install/standalone/logdrake +++ b/perl-install/standalone/logdrake @@ -207,6 +207,8 @@ my $timer; my @logs; +my $F; + sub parse_file { my ($file, $descr) = @_; @@ -273,14 +275,14 @@ sub parse_file { $win_pb->destroy if !$::isEmbedded || !$isExplain; if ($isTail) { - close F; - open F, $file or die "E: $!"; + close $F; + open $F, $file or die "E: $!"; local $_; - while () {}; #to prevent to output the file twice.. + while (<$F>) {}; #to prevent to output the file twice.. # $log_text->set_point($log_text->get_length()); $timer ||= Glib::Timeout->add(1000, sub { - logcolorize($_) while ; - seek F, 0, 1; + logcolorize($_) while <$F>; + seek $F, 0, 1; }); } insert_text_n_scroll(); -- cgit v1.2.1