13.6
Complex Data Structures
Perl can handle complex data
structures. This is useful in many programming situations; it's
also necessary to learn in order to read a lot of existing Perl code
that might come your way.
For example, in this book, you've parsed a lot of data. To do
so, you developed groups of subroutines, each fairly short, and each
parsing different levels of the structure of the data. By using
complex data structures, you can store your parse in a form that
reflects the structure of the data. This, combined with
object-oriented methods for accessing the parsed data, is a useful
way to accomplish a parse.
Complex data structures depend on
references, which I've touched on
in discussions of call by reference and of
File::Find.