in reply to Counting elements in array

Context is everything. Used in a quoted string, "@array" will print the elements. You must use it in a numeric context (i.e. if ( @array > 0 )) to have it behave that way.

It helps to remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.