note
naikonta
<blockquote><i>Dereferencing a hash? I don't see it in [doc://perlref], but it is in [doc://perlreftut].</i></blockquote>
If you're talking about examples of <i>dereferencing hash references</i>, [doc://perlref] does show a lot of them. To name a few (comments are mine)...,
<blockquote>
....you can replace the identifier with a simple scalar variable....
<code>
...
$$arrayref[0] = "January";
$$hashref{"KEY"} = "VALUE"; # deref the hash, assign a key
&$coderef(1,2,3);
...
</code>
....you can replace the identifier with a BLOCK returning a reference....
<code>
...
${$arrayref}[0] = "January";
${$hashref}{"KEY"} = "VALUE"; # same as above, differet syntax
&{$coderef}(1,2,3);
...
</code>
.... As a form of syntactic sugar....
<code>
$arrayref->[0] = "January";
$hashref->{"KEY"} = "VALUE"; # still the same, witha arrow operator
$coderef->(1,2,3);
</code>
</blockquote>
So does [doc://perlreftut], I suppose. Talking about words, that doc doesn't even have a single word of "dereference" or "dereferencing", though it doesn't matter to me. But I didn't know if [doc://perlreftut] talked about dereferencing <i>a hash</i>, or any other docs. :-)
<div class="pmsig"><div class="pmsig-607636">
<hr size="1" noshade="1">
<p align="right"><small>
<i>Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!</i></small></p>
</div></div>
644224
644240