in reply to Filehandles and CSV_XS
Ah - \*DATA or \*IN - err, what does '\*' imply?
*NAME refers to the symbol table entry for "NAME". It contains $NAME (*NAME{SCALAR}), @NAME (*NAME{ARRAY}), %HASH (*NAME{HASH}), &NAME (*NAME{CODE}) and a number of other things, including a file handle (*NAME{IO}) and a directory handle.
So when you are doing
print FH ...
It's effectively a shorthand for *FH, which is effectively a shorthand for *FH{IO}.
Things commonly accepted as file handles:
open( my $fh, ... ) assigns a reference to a glob to $fh (like \*FH).
|
---|