http://qs321.pair.com?node_id=11115748


in reply to lexical vs. local file handles

I've seen many Perl programmers advocating the usage of lexical scalars instead. Though there are good reasons for this, it has a drawback. Filehandles in Perl are special on a syntactical level. The compiler is capable of catching errors like this: The question remains: Do I miss something here? Do you see any pitfalls using this approach?

Hi,

Have you heard the expression "pennywise"?

Favoring global filehandles in order to let perl catch the unicorn of typos, is "pennywise but pound foolish"

Why wouldn't you favor  STDOUT->print(1) or  $fh->print(1) instead?

GLOB(0x3f9abc) ought to be something you would easily notice as an error when deeloping your program