On 18 Jun 2005, at 12:08, Peter Eisch wrote:

Ok, my turn to learn, where I have:

        while (!$bb->is_empty) {
            my $b = $bb->first;
            $b->remove;
            $b->read(my $newdata);
            $data .= $newdata;
            return $data if index($data, "\n") >= 0;
        }

It should really just be:

        while (!$bb->is_empty) {
            my $b = $bb->first;
            $b->read(my $newdata);
            $data .= $newdata;
            return $data if index($data, "\n") >= 0;
        }

So we don't need to delete/remove the bucket at all? Sweet - that should be even faster :-)

Matt.

Reply via email to