in reply to Re: why don't filehandles have punctuation before their name?
in thread why don't filehandles have punctuation before their name?
Because filehandles (and dirhandles) don't have a special syntax, like scalars/arrays/hashes, you have to refer to the entire glob instead. This is why you see code like:
The FileHandle and IO::Handle modules make it more convenient to use arbitrary handles, because they hide the reference-to-glob syntax.sub myprint { my($fh) = @_; print $fh "Hello world.\n"; } myprint \*STDOUT;
|
|---|