That should be:
%dict =( label => ['label 1', 'label 2'] )
Using [ .. ] to create an anonymous array.
The advantage is that array access is much faster than hash access.
A good approch would be to code up both alternatives and benchmark them.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re^3: HASH Array advice
by davorg
in thread HASH Array advice
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |