http://www.perlmonks.org?node_id=1003646


in reply to Re^8: Split output by tabs (bogus best practice)
in thread Split output by tabs

Braces are a nice visual cue that make a filehandle variable instantly recognizable as a filehandle.

Guessed that I could whip up an example where it isn't?

qwurx [shmem] ~ > perl -le '$h = {foo => "42"}; print {$h} "foo"' Not a GLOB reference at -e line 1. qwurx [shmem] ~ >

Aha.

sort {byid} @list; map {$_->()} @stuff; print {$fh||$ofh} @vars;

Braces are no nice visual cue! They mean and do something. Using them uncalled for is either decorative or cargo cult programming.

Note that I'm not averse to the odd drink which is style, I just don't call "best practice" any blurf which doesn't hold water.