use Devel::Size::Report qw/report_size/; # 1bit, 1byte, 2byte, 3byte, 4byte(=32bit), 5byte my $b = [ 0, 0xFF, 0xFFFF, 0xFFFFFF, 0xFFFFFFFF, 0xFFFFFFFFFF ]; print report_size($b, { indent => " " }); # null, length=1, 2, 3, 4, 5 my $c = [ '', '1', '10', '100', '1000', '10000' ]; print report_size($c, { indent => " " }); Size report v0.10 for 'ARRAY(0x8c8bc28)': Array ref 192 bytes (overhead: 92 byte
{{#tags}}- {{label}}
{{/tags}}