Well, what's a variable to you?
Is each name a variable?
Well, there's only one name.
Is each block of allocated memory a variable?
$x has three given my $x = '123'; (SV head, SV body, string buffer).
%hash has 9 (-ish) given my %hash; $hash{'key'} = '123';.
my %hash; $hash{key}{subkey} = '123'; would have double minus two what my %hash; $hash{key} = '123'; has.
(Not counting any memory used by the pad or by the memory allocation system.)
Or are you constraining yourself to SVs and their derivatives (AV, HV, etc)?
$hash{key} = '123'; involves a hash (with a key and a number buckets) and a scalar.
$hash{key}{subkey} = '123'; involves two hashes (with a key and a number buckets each) and two scalars (one a reference, the other a string).
Your question doesn't make that much sense. What's your real question?
In reply to Re: hash of hashes and memory space...
by ikegami
in thread hash of hashes and memory space...
by bcarroll
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |