There's ways other than kyle's very reasonable suggestion of scalar. You just have to force scalar context. Here's a couple of different ways that spring to mind:
print 0+@my_array; print "length = " . @my_array;
In reply to Re: Printing the length of an array ?
by FunkyMonk
in thread Printing the length of an array ?
by jflevi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |