in reply to How do I test if an array is empty or not?

The name of the array (like @a) in a scalar context yields the number of elements currently in the array. And a boolean test selects scalar context automatically, so something like:
if (@a) { # @a is not empty... ... } else { # @a is empty ... }
should work just fine.