Perl hash of hashes anonymous array

Hello experts. I'm having problems with a snippet of code.
I was hoping to get help/advice to correct.
A file that this script parses has changed to the point where
I can no longer use a scalar, it looks as though I need to
create an array for a hash of hashes below.

The first output of Dumper is from the actual script, the desired output
is what I think I need to assign. The problem with the script now is the
hash gets overwritten with the next valid value, I need to display all the values.
This is why I think I need an anonymous array within the hash of hashes.
I'm having issues with using push on this array. I can't seem to figure out the
correct syntax for this. I'll probably need help in dereferencing it as well, because
frankly I'm getting burnt out on this one.

Thanks guys

foreach my $z (sort keys %team) {
    for $y (@{$team{$z}}) {
      $_raw{$z}{$lookupph{$y}}=$y;
    }
}
print Dumper \%_raw;



-- Output --

'account' => {
                      'name01' => 'phone1',
                      'name02' => 'phone1',
                      'name03' => 'phone1',
                      'name04' => 'phone1',
                      'name05' => 'phone1',
                      'name06' => 'phone1',
                      'name07' => 'phone1',

					  
					  
Disired output

'account' => {
                      'name01' => ['phone1', 'phone2']
                      'name02' => ['phone1', 'phone2']
                      'name03' => ['phone1', 'phone2']
                      'name04' => ['phone1', 'phone2']
                      'name05' => ['phone1', 'phone2']
                      'name06' => ['phone1', 'phone2']
                      'name07' => ['phone1', 'phone2']

Also, how would I dereference the desired array reference?

Thanks in advanced.

Can you tell what your perl code is doing a brief synopsis would suffice and also what kind of variables are being used and for what as this would give us all a starting point...