in reply to hashes & looking up

you cannot place the username AND an hash reference in a array. what you need is a hash of hash so you can do
$usernames{username} = { key1 => value1, ...};
lookup by username is trivial (my %otherkeys = %{$usernames{that_username}})
to lookup by ip you need a foreach loop:
foreach my $key (keys %usernames) { if($usernames{$key}->{Framed-Address} eq $ip_i_look_for) { print "ip $ip_i_look_for owned by user $key \n"; last; } }