Chapter 5. What’s in a Name?
5.1 More About Data Types
By the end of this chapter, you will be able to read the following Perl code:
use strict;use warnings;my @l = qw/a b c d d a e b a b d e f/;my %hash=();foreach my $key (@l){ $hash{$key} = $key;}print join(" ",sort keys %hash),"\n";
Again, please take note that each line of code, in most of the examples throughout this book, is numbered. The output and explanations are also numbered to match the numbers in the code. When copying examples into your text editor, don’t include these numbers, or you will generate errors.
5.1.1 Basic Data Types (Scalar, Array, ...
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.