http://www.perlmonks.org?node_id=1001510


in reply to store file handles in a hash

From print:

If you're storing handles in an array or hash, or in general whenever you're using any expression more complex than a bareword handle or a plain, unsubscripted scalar variable to retrieve it, you will have to use a block returning the filehandle value instead...

So, just change the last line in the while loop to:

say { $handles{$file_out} } join "\t", @some_data;

Hope that helps,

Athanasius <°(((><contra mundum