perl - How to find how many bytes of data array holding -



perl - How to find how many bytes of data array holding -

how find how many bytes of info array holding? @aead=("ansfl;ahslhfalkhf aklshfakl;");

i find array how many bytes of info has.

devel::size has tools measure memory usage.

use devel::size qw( total_size ); $memory_usage = total_size(\@a);

if trying find total of number of characters in each string in array,

use list::util qw( sum ); $total = sum 0, map length, @a;

or

my $total = 0; $total += length @a;

perl

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -