Chapter 12. Does This Job Require a Reference?

Image

By the time you finish this chapter, you will understand the following Perl statements:

use Data::Dumper;use warnings;use strict;my $student={ "Name"=>undef,              "Major"=>undef,              "Courses"=>[],              "Stats"=>{},            };$student->{"Courses"}=[ qw( French Algebra Chemistry ) ];$student->{"Stats"}->{"PointAve"}=3.5;$student->{"Stats"}->{"StartDate"}="09/17/12";print Dumper $student;

12.1 What Is a Reference?

You have a post office box where you receive mail. The address on a letter contains a reference to your mailbox. The postman goes ...

Get Perl by Example 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.