You have (at least) a couple of options:
print "Array size is ", scalar(@array), "\n";Your pick. You need to force scalar context, which I explicitly did by using the scalar function.
In reply to Re: Counting elements in array
by thezip
in thread Counting elements in array
by finfan
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |