This may not be nearly as much fun as writing a perl script, but in BDB 4.2 "db_archive -d" will delete unneeded log files.
--Quanah
-- Quanah Gibson-Mount Principal Software Developer ITSS/TSS/Computing Systems ITSS/TSS/Infrastructure Operations Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html