16 lines
513 B
Perl
16 lines
513 B
Perl
|
#!/usr/local/bin/perl -w
|
||
|
|
||
|
# Set up the data types.
|
||
|
my $scalarVar = "Tom was here.";
|
||
|
my @arrayVar = qw (Sunday Monday Tuesday Wednesday Thursday Friday Saturday);
|
||
|
my %hashVar = ("Toronto" => "East", "Calgary" => "Central", "Vancouver" => 'West');
|
||
|
|
||
|
# Create the references
|
||
|
my $scalarRef = \$scalarVar;
|
||
|
my $arrayRef = \@arrayVar;
|
||
|
my $hashRef = \%hashVar;
|
||
|
|
||
|
# Print out the references.
|
||
|
print "$scalarRef \n";
|
||
|
print "$arrayRef \n";
|
||
|
print "$hashRef \n";
|