in reply to Re^2: Array or Hash problem!
in thread Array or Hash problem!
So you want to have '2222987' as key and 'TMW2222987' and '66' as values? In that case you could use a two-element array or just concatenate the two values into a string:
$ids{$accountnumber}= "$acc_id:$1$accountnumber";
The $1 is what was matched with the first parenthesis in your regex, so should be 'TMW' or ' ' or '' or ...
You get both values separated again with:
my($acc_id,$fullaccount)= split /:/,$ids{$accountnumber};
|
|---|