Hour 4. Stacking Building Blocks: Lists and Arrays

What You'll Learn in This Hour:

Scalars are Perl's singular nouns. They can represent any one thing—a word, a record, a document, a line of text, or a character. Often, though, you need to talk about collections of things—many words, a few records, two documents, fifty lines of text, or a dozen characters.

When you need to talk about many things in Perl, you use list data. You can represent list data in three different ways: by using lists, arrays, and hashes.

Lists are the simplest representation of list data. A list is simply a group ...

Get SAMS Teach Yourself Perl in 24 Hours THIRD 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.