Thanks, that is what I was looking for. Need to use STRIKE
next time instead, but just kept working through it and probably posted too early but that open filehandle way looks more efficient than what I was doing and answered my original question.
I'm using DXSEARCH to get tens of thousands of directory search results even though the LDAP server has a search limit set of 1k per search and there's no easy way to deal with that with LDIF module (paged client side searching).