in reply to Re^2: How to create a compact data structure?
in thread How to create a compact data structure?
I don't know about 'reliable' but 'how' should work like this:
Update: I missed the point, please ignore.
use Devel::Size qw(total_size);
# code by perrin
my $size_rec_hash = total_size(\%record);
my $size_flag_hash = total_size(\%flag);
print "Total size: $size_rec_hash + $size_flag_hash =",
$size_rec_hash + $size_flag_hash, "\n";
Code written by Hofmator and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.