Posted on 2009-05-28 22:02:26-07 by wjgeorge
glitch in LineNumbers.pm
the code used to count "\n" characters uses a substr incorrectly; it assumed that the third parameter in substr was a "to" count instead of a length:
In LineNumbers.pm line 81, change $linenum += ( substr($_, $last_pos, $new_pos) =~ tr[\n][] ); to $linenum += ( substr($_, $last_pos, $new_pos - $lastpos) =~ tr[\n][] );
Direct Responses: 12605 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.