in reply to About Filehandles

How about first sort the file, then you can write one subcat after the other. No more than one filehandle open!