|We don't bite newbies here... much|
Byte counts and Seek functionby Dr Manhattan (Beadle)
|on Aug 27, 2013 at 21:10 UTC||Need Help??|
Dr Manhattan has asked for the
wisdom of the Perl Monks concerning the following question:
I am parsing a file by sentences and outputting them with byte count at the start of each sentence.
I add the 9 for the 8 digits at the beginning of each line plus the newline at the previous line
The problem is when I use the 'seek' function, it works perfectly fine for the first 3 lines en then somehow breaks. After the 3rd line when I seek, it outputs from somewhere around the middle of the previous entry
Somehow the byte counting is missing something somewhere. Any ideas?
Thanks in advance for any help, much appreciated