summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/logdrake
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone/logdrake')
-rwxr-xr-xperl-install/standalone/logdrake12
1 files changed, 7 insertions, 5 deletions
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 (<F>) {}; #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 <F>;
- seek F, 0, 1;
+ logcolorize($_) while <$F>;
+ seek $F, 0, 1;
});
}
insert_text_n_scroll();