same way you did with teh scalar:
dereference it:
%$hash_reference;
there's a tutorial on this at http://japh.nu
hope that helps
Jos
----- Original Message -----
From: "Ulle Siedentop" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 26, 2001 3:30 PM
Subject: Problems with Referenzes
> I try to understand references in perl.
>
> $try = "test"; # Scalar $try conains value test
> print $try; # prints test
>
> $try_ref = \$try; # Scalar $try_ref contains reference to
> $try
> print $try_ref; # prints SCALAR(0x1234567)
>
> print $$try_ref; # prints test
>
> Now I would like to do something similar with a hash. For
> example:
>
> $name{"Jackson"} = "Michael"; # key = Jackson, value =
> Michal
> $name{"Wilder"} = "Billy"; # key = Wilder, value = Billy
> print %name; # prints JacksonMichalWilderBilly
>
> $try_ref = \%name; # Scalar $try_ref contains reference to
> hash %name
> print $try_ref; # prints HASH(0x7654321);
>
> Now I don't know how or I don't understand how to get any
> key or value back from the reference $try_ref???
>
>
>
>
> --
> 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]