A variable name must start with a letter or an underscore.
From perldata:
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.
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:
my %bad = (
'12598' => {}, # data about bad sequence
'19203' => {}, # data about other bad sequence
)
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 saying
$12598{'foo'} = 'bar'; # wrong and illegal
now you'd say
$bad{'12598'}{'foo'} = 'bar';
Make sense? |