in reply to Hash table of arrays
push @{$machinearray{$machine}}, $pwline;
You can also tighten up your grep a bit. If $uname contained "brad", for example, and your array contained "bradford", it would match your regex and fail to add "brad" to the array. The following is probably what you want:
if (!grep {$_ eq $uname} @{$machinearray{$machine}})
Enjoy!
|
|---|