in reply to question on B-tree

Dominus has an old (but very good) article about them. It has Perl examples. The Wikipedia article and NIST page (from NIST's Dictionary of Algorithms and Data Structures resource) can point you at similar, more specific or more general structures.