Hour 7. Hashes
What You'll Learn in This Hour:
The hash is the third basic data type in Perl. The first data type you learned about was the scalar, which is a simple data type designed to hold one thing (any one thing—of any size—but still one thing). Next came the array, which is a collection of scalars. An array can hold as many scalars as you like, but searching for the scalar value you need in an array usually involves sequential access of the array until you find the scalar you need.
Hashes are another kind of collective data type. Like arrays, hashes contain a number of scalars. The difference between arrays and hashes is that hashes access their scalar data ...
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.