Chapter 6. Hashes, References, and Complex Data Structures


This chapter completes your study of the basic Perl data types with an examination of associative arrays, better known as hashes. Unlike ordinary arrays, hashes enable you to use a string as an index rather than a number.

This chapter also covers references. A reference is similar to a C pointer in that it points to other data. (Actually, there are some differences between the two, but for now, you can consider them about the same.)

Finally, the chapter combines all the data structures along with your knowledge of references to create complex data structures. As you will see, nested data structures in Perl are a little trickier than they are in C or C++.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset