in reply to Re^2: HASH Array advice
in thread HASH Array advice

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.

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Replies are listed 'Best First'.
Re^4: HASH Array advice
by Anonymous Monk on Jan 24, 2006 at 12:02 UTC
    Slap me with a wet micro$oft t-shirt for not using [ .. ]
    Had a brain fart for a second using ( .. )

    There's not much difference in the bench mark, but i suppose the size of the array makes a difference... and i predict it will become rather large as my program progresses...