$line =~ s/\r//;
- # Set current size and offset
- $cursize += bytes($line);
- $current_offset += bytes($line);
-
# Start to exclude from parsing any desired lines
if ($has_exclusion >= 0) {
next if ($ef);
}
+ $cursize += length($line);
+ $current_offset += length($line);
+
chomp($line);
$nlines++;
next if (!$line);
return (1, "reach the end of check_file_changed() with start date: $saved_date and file size: $totalsize") ;
}
-# Return real size of ascii and unicode string.
-sub bytes($)
-{
- use bytes;
- return length shift;
-}
# Method used to check if we have already reached the last parsing position in incremental mode
# This position should have been saved in the incremental file and read in the $last_parsed at