in reply to size of array from ref

$size = @array; #Gives size of array.

Can be used as follows ...
for($i=0;$i<$size;$i++) { #Do work here; }