in reply to Re^2: Data Structure: HOA or AOH ??
in thread Data Structure: HOA or AOH ??

ikegami,
Thanks for pointing out the mistake. I am still trying to wrap my brain around a hash slice.

Replies are listed 'Best First'.
Re^4: Data Structure: HOA or AOH ??
by ikegami (Patriarch) on Jan 31, 2010 at 17:53 UTC
    It's just like $hash{foo}, except you have multiple keys.
    @hash{qw( foo bar )} = (1, 2);
    is basically the same as
    $hash{foo} = 1; $hash{bar} = 2;

    (I said "basically" because there is a difference. The former uses a list assignment while the latter uses two scalar assignments. List assignments don't return the same as scalar assignments. See Mini-Tutorial: Scalar vs List Assignment Operator)