in reply to hashes & looking up

Just to add on to other posts here, if you already have a hash built, keyed on username (such that $hash{$username}->{'Framed-Address'} gets you their IP), you can build a second hash keyed off of IP to simply point to the same data:
# First build us a 'user' key so that our %iphash # can get the username. foreach (keys %hash) { $hash{$_}->{user} = $_; } @iphash{map { $hash{$_}->{'Framed-Address'} }, keys %hash } = values % +hash;
Modifications to data under %hash will affect data under %iphash as well, since we're pointing to the same reference.