At 03:31 AM 6/24/05 -0400, Chris Wagner wrote:
>while (read FILE, $buffer, 32768) {
>        $buffer =~ s/\cM\cM\cJ/\cM\cJ/g;
>        print FILE2 $buffer;
>}

There's a bug in this.  If the buffer ends in the middle of \cM\cM\cJ
sequence, it won't be detected.  We need to test that we're not in the
middle of a sequence and get some more bytes if we are.

while (read FILE, $buffer, 32768) {
        my $extra;
        read FILE, $extra, 32768 and $buffer .= $extra if $buffer =~ m/\cM$/;
        $buffer =~ s/\cM\cM\cJ/\cM\cJ/g;
        print FILE2 $buffer;
}

This should be added to the other methods I described too.






--
REMEMBER THE WORLD TRADE CENTER         ---=< WTC 911 >=--
"...ne cede males"

00000100

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to