in reply to hash of hashes and memory space...
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: hash of hashes and memory space...
by bcarroll (Pilgrim) on Mar 23, 2010 at 19:02 UTC | |
by ikegami (Patriarch) on Mar 23, 2010 at 20:16 UTC | |
by jethro (Monsignor) on Mar 24, 2010 at 01:33 UTC | |
by bcarroll (Pilgrim) on Mar 24, 2010 at 14:54 UTC |