You can do something like this:
%url_options_hash = ("times_visited"=>0);
%url_hash = ("this_url"=>\%url_options_hash);
%usr_hash = ("igor"=>\%url_hash);
print $usr_hash{"igor"}->{"this_url"}->{"times_visited"}, "\n";
$usr_hash{"igor"}->{"this_url"}->{"times_visited"} = 1;
print $usr_hash{"igor"}->{"this_url"}->{"times_visited"}, "\n";
That worked for me, you use in this case the reference for the 'inner' hashes.
Igor.
> ----- Mensagem original -----
> De: Sean Rowe [SMTP:[EMAIL PROTECTED]]
> Enviada em: sexta-feira, 6 de dezembro de 2002 11:30
> Para: Beginners@perl. org (E-mail)
> Assunto: Hash Question
>
> I need to keep track of a user, all the web pages a user has visited, and
> the number of times the user visited each page. I get my information from a
> log file. Here's how I would like to say it programmatically:
>
> $Hash{"$User"}{"$Page"}{"$NumTimesVisited"} = $ANumber;
>
> Is this possible? If so, how would I traverse this, as I will not know
> before hand the values in the hash; I will need to use something like sort.
> Thank you.
>
> Sean Rowe
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]