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]