Skip to Main Content
Perl by Example, Fourth Edition
book

Perl by Example, Fourth Edition

by Ellie Quigley
November 2007
Intermediate to advanced content levelIntermediate to advanced
1008 pages
20h 15m
English
Pearson
Content preview from Perl by Example, Fourth Edition

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

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Perl in a Nutshell, 2nd Edition

Perl in a Nutshell, 2nd Edition

Nathan Patwardhan, Ellen Siever, Stephen Spainhour
Programming Perl, 3rd Edition

Programming Perl, 3rd Edition

Larry Wall, Tom Christiansen, Jon Orwant
Learning Perl, 7th Edition

Learning Perl, 7th Edition

Randal L. Schwartz, brian d foy, Tom Phoenix
Minimal Perl

Minimal Perl

Tim Maher

Publisher Resources

ISBN: 9780132381826Purchase book