in reply to Re^3: Bareword vs. Indirect Filehandle behaviour
in thread Bareword vs. Indirect Filehandle behaviour
I have no doubt Perl could get it right, because it knows what variables are file handles and what aren't.
In general, Perl actually can't know this. It's reasonably easy to make a Perl object that can act as a file handle as well as a string, depending on how you use it.
|
|---|