Jakub Narebski [off-list ref] writes:
I have thought however (but I might be mistaken) that "print {$fh} <sth>"
is idiomatic Perl.
'perldoc -f print' says:
Note that if you're storing FILEHANDLES in an array or other expression,
you will have to use a block returning its value instead:
Note that "in an array or other expression". I've always thought the
intention of this phrase was "you _could_ help the parser by doing this,
if you have expression more complex than a simple scalar variable
reference".
IOW, I know that {} _can_ be used there, but I haven't seen people write
{$a_single_variable}, especially without a space around the "expression"
(technically, a single variable is an expression), when
print $fh <stuff>
suffices, and I was curious why you chose to use the syntax when it wasn't
necessary. Besides, {$fh} looks so eh... (hesitates to mention a dirty
word ^W^W^Wthe name of a different language, but bleeps it out)...