in reply to Re: Array named for array element?
in thread Array named for array element?

The reason I want to do it this way is because the script I'm writing is to be used for files of varied length with differing frequencies of the first element occurring in the text. And the first element will vary between different files. I'm thinking this might be best done with an array of arrays, where the array is named for the first element, and the arrays underneath would have the rest of the data.

Replies are listed 'Best First'.
Re: Re: Re: Array named for array element?
by allolex (Curate) on Jul 02, 2003 at 22:14 UTC

    Then you definitely want a hash of arrays just like everyone else suggested. :)

    --
    Allolex

      What happens when that has has repeated keys though?

        Well, a hash cannot have repeated keys. If the key is identical, it will overwrite your old data. You can use a counter to number the hash keys and avoid this problem. :)

        HTH

        --
        Allolex