A.8 Complex Data Structures

The standard Perl data types, scalar, array, and hash, can be combined into more complex data structures using references. The construction of complex data structures is summarized in Chapter 2.

As an example, you can define a two-dimensional matrix as an array of anonymous arrays (recall that an anonymous array is a reference to array data):

@microarray = (
    [ 10, 2, 14 ],
    [ 15, 4, 54 ],
    [ 51, 0, 99 ]
);