in reply to hash of arrays -- Im missing something

I guess your problem is, that you build an anonymous array in your hash. When you want to get back the values from that array, you must do the following:
$player_info{$ipaddr} = [$nickname, $userid, $player_req]; for $key ( keys $player_info) { print @{$player_info{$key}} }
or just fill the hash in an other way:
push @{$player_info{$ipaddr}} , ($nickname,$userid,$player_req); print ${$player_info{$ipaddr}}[0]; ## gives the nickname ...
Remember you have a reference as a hash value, so you must deref it with adding a ${...}[index] or a @{...} to get access to the values of the array inside your hash.
Hope this helps.

update woahh Zaxo is right here with the qw-part, changed this.

----------------------------------- --the good, the bad and the physi-- -----------------------------------

Replies are listed 'Best First'.
Re: Re: hash of arrays -- Im missing something
by snafu (Chaplain) on Jul 26, 2001 at 07:24 UTC
    Once I used the help Zaxo gave me I was able to use your help to figure out what I was doing wrong. Thank you!

    ----------
    - Jim