Perl: the Markov chain saw | |
PerlMonks |
Re: what is the variable type of $data = {by ikegami (Patriarch) |
on Jun 21, 2019 at 21:00 UTC ( [id://11101693]=note: print w/replies, xml ) | Need Help?? |
$data is a scalar. Its value is a reference to a hash. ({ } returns a reference to a newly-constructed hash.) Similarly, the values of the referenced hash are also reference to hashes. We call this a "Hash of Hash" or "HoH". While it's technically a reference to a hash of references to hashes, the presences of references is implied because scalars (e.g. $data, $data->{a10}) can't contain hashes directly.
In Section
Seekers of Perl Wisdom
|
|