September 2002
Intermediate to advanced
496 pages
10h
English
References are pointers. A reference variable stores an address. In this way you can store a pointer to a huge chunk of data and later dereference the pointer to get at the data.
You can think of a Perl reference as a scalar whose value is the address in memory of where a piece of data is stored. The piece of data may be a simple value, such as a string, or it might be more complex, such as a record consisting of a name, an occupation, and a series of elements relating to the occupation. In Perl, a reference is a scalar variable that contains the address of some arbitrarily complex piece of data.
One way to create a reference is by using the \ symbol. You can think of ...
Read now
Unlock full access