in reply to Nonsense error from Perl

If you read the documentation for print you will see that you have to put {} around a filehandle like that:

print { $x{ handle } } "Wow!\n";