Certainly, make the hash values be references to arrays. We call that a HoA.
You can get at the array elements with multiple indexing: my $char = $hoa{'alpha'}[42]; See perldsc and perllol for more on perl's deeper data structures.my %hoa = ( alpha => ['A' .. 'Z','a' .. 'z'], numeric => [0 .. 9], );
After Compline,
Zaxo
In reply to Re: Arrays & Hashes
by Zaxo
in thread Arrays & Hashes
by Bugorr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |