In addition to Martin's suggestion, look at pkg_comp, which does a lot of things that are sort of like what you might want, and thus is a good example. -- Greg Troxel <gdt@ir.bbn.com>