in reply to Re: Array names
in thread Array names

Ok. It's worked.
But this is hash, no array :(

How me made this use array?

Thx, Chewby

Replies are listed 'Best First'.
RE: RE: Re: Array names
by chromatic (Archbishop) on May 11, 2000 at 19:06 UTC
    It's actually a hash of arrays. That is, it is like a standard hash, but instead of the values being scalars, they are array references:
    my %data = ( 'abacus' => [ 1, 2, 3, 4, 5], 'qwerty' => [ 5, 4, 3, 2, 1]);
    This way, you can refer to the arrays by name without having to use symbolic references (you can store array names in variables, and use those variables as keys to the hash -- that will prevent some subtle errors).

    See perlref and perldsc for more information. It's a very powerful technique.