get array size in perl

by rajesh 2008-11-19 20:45:25

To get the size of an array in perl we can use "scalar @arrayname"

Example code

$size = scalar @array;
print "size of array is ".$size;

Tagged in:

1492
like
0
dislike
0
mail
flag

You must LOGIN to add comments