in reply to Array names

You'd probably be much better off using a hash here.
$hash{'abacus'} = ([1,2,3,4,5]); $hash{'querty'} = ([6,7,8,9,10]);
So then $hash{'abacus'} and $hash{'qwerty'} are array references you can read like:
print $hash{'abacus'}[0]; # Prints "1" print $hash{'qwerty'}[1]; # Prints "7"
Then you also have the advantage of easy access to all your array "names" by using keys %hash

Replies are listed 'Best First'.
RE: Re: Array names
by Anonymous Monk on May 11, 2000 at 10:27 UTC
    Ok. It's worked.
    But this is hash, no array :(

    How me made this use array?

    Thx, Chewby
      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.