while (defined($_ = $t->getline)) { last if (...test for end of response...); push(@ok, $_); }