in reply to Re^2: Thrashing on very large lines
in thread Thrashing on very large lines
Moving the check for $read == 0 was quite appropriate. Admittedly, $skip was not optimally named. (I'd prefer $in_bad_record. It was called $skip because I initially discarded the bad stuff. I didn't notice you wanted to keep it.) However, your fix of the bug in read wasn't optimal.
Me:
my $read = read($fh_in, $buf, $blk_size, length($ofs));
You:
What it should be:my $read = read($fh_in, $newbuf, $blk_size); ... $buf .= $newbuf;
my $read = read($fh_in, $buf, $blk_size, length($buf));
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Thrashing on very large lines
by chr1so (Acolyte) on Apr 21, 2006 at 00:47 UTC |