in reply to multidimensional arrays
However, a hash *key* can quite well consist only of digits; so as you allude to in the title, what you probably need here is a multidimensional data structure. I don't know what you're planning to store in addition to the bad sequence... presumably something for which you needed a hash in the first place. But anyway:The rest of the name tells you the particular value to which it refers. Most often, it consists of a single identifier, that is, a string beginning with a letter or underscore, and containing letters, underscores, and digits.
and so on. Each bad sequence string maps in the hash to an anonymous hash that you can use just as you planned to use your original hash, %12598. Instead of sayingmy %bad = ( '12598' => {}, # data about bad sequence '19203' => {}, # data about other bad sequence )
now you'd say$12598{'foo'} = 'bar'; # wrong and illegal
Make sense?$bad{'12598'}{'foo'} = 'bar';
|
|---|