in reply to Test Number of Elements In Array

No, your first method is the best and most readable way. == imposes scalar context so this is safe as well.

If you are looking for other ways, if (not (@foo-1)) or if (not $#foo) achieve the same, but are not readable anymore.