Going Deeper

The creation and use of references is probably one of the more complex aspects of Perl (arguably surpassed only by object-oriented programming, which we'll look at tomorrow). In today's lesson I've introduced you to the basics of references and the places where you'll most commonly use them. But as with most Perl topics, there's plenty of other features I haven't covered that relate to references, including symbolic references (a whole other form of reference), and references to subroutines, typeglobs, and filehandles.

For more information on references, check out the perlref man page. If you do more work with nested data structures, the man pages perldsc (data structures cookbook) and perllol (lists of lists) provide further detail ...

Get Sams Teach Yourself Perl in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.