Commits

Taylor Venable committed 9da7d3a

Fix a bug upon encountering EOF.

Comments (0)

Files changed (1)

ldap-logalyzer.pl

         chomp $line;
         if ($line =~ $regexp) {
             my @entry; my $attr;
-            chomp($line = <$handle>);
+            $line = <$handle>;
             while ($line) {
+                chomp $line;
                 # Handle continuation line if it exists.
                 $line = pop(@entry) . substr($line, 1) if substr($line, 0, 1) eq ' ';
                 push @entry, $line;
-                chomp($line = <$handle>);
+                $line = <$handle>;
             }
             my @data;
             given ($OPTIONS{'info'}) {