in reply to Re: Variable Filehandles
in thread Variable Filehandles

It looks like the first code snippet in my first response does precisely what you're wanting.