http://www.perlmonks.org?node_id=957008


in reply to Perl out of memory

The issue you are running into is because you are collecting all of the matching LDAP results before processing, rather than processing them one at a time. Depending on the system, this could easily be a number of results which would cause you to run out of memory. You will probably want to look at using the callback option on the search method, which should help you to do so.

Hope that helps.