I think you have your arrays and hashes a bit mixed up.
So usually I'd use $$player_dbref{happyplayer}{22.22.22.22} to get the user id and to get that I'd have to traverse the hash keys to find the name of a player and then I'd have to traverse the hash again with the player's name I just got as the key to get the IP and so on and so forth.
Actually, I don't think it works like that: happyplayer is the name of a player already: you don't have to traverse the hash to find it, you just key into it directly and its value is a reference to another hash, which is keyed by IP.
The same goes for $$player_dbref{player_name}{ip_addr}{id}. id is already the id as key to whatever value you like to put in that slot.
The way you have set-up this hash is such that every player can have many IP's, which each can have many ID's, which finally point to 'a value' (I can't find in your post what this value seems to be)). But you never actually store --as values that is-- names of players, their IP's or their ID's. All these data are only existing as keys into the hashes which yield you references to other hashes and finally to a value, which is not used AFAIK.
ALso, note that every "player" has its own hash of IP-references and each IP has its own hash of ID-references. There is actually no connection between the IP's for the different players: i.e. you cannot "easily" traverse all IP-references for all players: these references are not in the same hash! The same goes for your ID-references.
I would suggest you play around a bit with Data::Dumper to see what I mean and to see what and how things are stored in your HoH.
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
In reply to Re: Lamens terms how-to on HoH refs and the arrow operator
by CountZero
in thread Layman's terms how-to on HoH refs and the arrow operator
by snafu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |