Pages

Showing posts with label multi-dimensional hash. Show all posts
Showing posts with label multi-dimensional hash. Show all posts

Thursday, August 8, 2013

Multi-Dimensional Hashes in Perl


Introduction To Hashes

Perl hashes are data types that allow you to associate data to a key. For example, a hash can store article titles with the date of publication as the key:

%hash = (20030227 => 'Multi-dimensional hashes',
         20030113 => 'Introduction to mod_perl',
         20021201 => 'The CPAN Module'
);

This is a one-dimensional hash.