in reply to Hash table of arrays

I think what you're doing is looking up a particular user on a particular machine; and if that user doesn't exist on that machine, then you're adding that user to that machine list. Right? You should be using push to add the user to the array of users:
push @{ $machinearray{$machine} }, $pwline;
This will add $pwline to the end of the array.

You may want to think about alternate data structures, though, if you're going to be looking up a lot of users. Something like this, perhaps?

my %machines = ( machine1 => { user1 => 'pwline1', user2 => 'pwline2', }, machine2 => { user1 => 'pwline1', user3 => 'pwline3', }, );
This way you can quickly look up a particular user on a particular machine, and you also have access to the password lines. Then you could do:
if (!exists $machines{$machine}{$uname}) { ## User doesn't exist. Add him/her. $machines{$machine}{$uname} = $pwline; }
Make sense?