http://qs321.pair.com?node_id=590893


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:
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";
Update: I missed the point, please ignore.

-- Hofmator

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.