"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
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.