Re: Is there a problem with using barewords as filehandles ?by LanX (Cardinal)
|on Jul 01, 2020 at 11:04 UTC||Need Help??|
Apart from scoping/namespace rules...
The essential problem is that subs and FHs can't be distinguished.
In Perl 4 subs needed a & sigil, this was dropped in Perl 5 but no sigil was introduced for filehandles, so ambiguity was a consequence.
That's not only frustrating for users but must complicate maintenance of the parser.
Another problem is passing FH as arguments into subs.
Then newbies need to learn the whole typeglob technique with *FH.