O'Reilly logo

Perl by Example, Fourth Edition by Ellie Quigley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. Does This Job Require a Reference?

Does This Job Require a Reference?

What Is a Reference? What Is a Pointer?

You can use the terms “reference” and “pointer” interchangeably in Perl. A reference is a variable that refers to another one. In short, it contains the address of another variable. We have seen the usefulness of references when passing values to a subroutine (Chapter 11). We can also use references, or pointers, to create more complex data types, such as a hash that contains a key followed by a list of values, or an array of arrays, etc. and we will need references in the next chapter when creating Perl objects.

Symbolic versus Hard References

A hard reference

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required