Linux Magazine: Filehandle References [in Perl]Jun 04, 2000, 12:13 (0 Talkback[s])
(Other stories by Randal L. Schwartz)
WEBINAR: On-demand Event
Replace Oracle with the NoSQL Engagement Database: Why and how leading companies are making the switch REGISTER >
"In the past two columns, I looked at using references in Perl and showed the basic syntax for creating references to arrays, hashes, scalars, and subroutines. I also described the canonical form of converting a non-reference expression into a reference, and how to use the shortcut rules to make this simpler."
"Let's take a look now at filehandles and directory handles. These handles let us look at or talk to the "outside world," a worthwhile endeavor if we want our program to have some permanent impact on the computing environment."
"First, recall that a filehandle doesn't really have a syntax to make it a full-fledged variable. You can't assign it, use it (directly) with local() or my(), pass it to or from a subroutine, or store it into a data structure. What does that leave? Well, there are about a dozen operations that use a filehandle or a directory handle, specified by a bareword (an alphanumeric symbol sequence separated by double colons, like STDIN or MyPack::Output)."
0 Talkback[s] (click to add your comment)