In reply to Sorting data that don't fit in memory, tilly told me to
try BerkeleyDB to fool around with large amounts of data.
I have implemented stuff, and I'm not totally through now,
but I already can say that Berkeley shows impressive
performance. You can d'8 it at http://www.sleepycat.com.
The distribution carries the perl interface. This DB is
scalable and
portable. Don't forget to specify a large cache.