in reply to Nonsense error from Perl

Only one of these can work:
print $handles{foo};
print $strings{foo};

The latter was picked to work. As such,

print $x{y} "Wow!\n";
is as much an error as
$s = $x{y} "Wow!\n";

If the file handle expression is non-trivial, you can't omit the curlies around the expression.

print $fh "..."; print { $fh } "..."; print { $handles{foo} } "..."; print( $fh "..." ); print( { $fh } "..." ); print( { $handles{foo} } "..." );

print