in reply to Nonsense error from Perl
print $handles{foo};
print $strings{foo};
The latter was picked to work. As such,
is as much an error asprint $x{y} "Wow!\n";
$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} } "..." );
|
|---|