in reply to About Filehandles

Store your filehandles in a hash as already suggested. Then if you undef the hash, all of the files should close.