Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: data structures

by gamache (Friar)
on Nov 27, 2007 at 18:31 UTC ( [id://653328] : note . print w/replies, xml ) Need Help??

in reply to data structures

Perl's two primary data structures are the array and the hash. An array keeps its elements in a certain order; a hash is unordered but stores each of its values under a certain 'key', which may then be used to retrieve a given value. Arrays and hashes may both contain other arrays and hashes; in this case, they actually contain a reference to the array or hash.

If you want to see what these data structures look like, try use Data::Dumper; followed by print Dumper (\%hash), for instance.