in reply to using a filehandle stored in a hash

You already have the solution, but here is how to get the solution: read the documentation of print:
Note that if you're storing FILEHANDLEs in an array, or if you're using any other expression more complex than a scalar variable to retrieve it, you will have to use a block returning the filehandle value instead:
print { $files[$i] } "stuff\n";