in reply to Memory Restrictions

You may wish to consider a tied datastructure. Two tutorials are available on the site, The Tie()s That Bind and Tie: Creating Special Objects, that might be helpful. My limited understanding is that you can tie() a datastructure such as an array or a hash to a file, so the data is maintained in the file rather than memory. A little slower perhaps, but would easy your memory requirements (although if you are low in disk space as well you might encounter problems).

Hope that helps, and I look forward to the suggestions of others that might also be helpful.

Update (23-Oct-2002): Another resource that might be helpful might be the perltie documentation in the standard distribution.