in reply to Hash table of arrays

Looks like you have an extra ${} in there. But I'll do you one better and show you an easier way.

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!

*Woof*