in reply to How to determine if an array passed as an argument to a subroutine is zero-length

# array passed as list if (@_) { # do non-empty things } else { # do empty things }
In a conditional, @_ is in scalar context and returns its length.

After Compline,
Zaxo

  • Comment on Re: How to determine if an array passed as an argument to a subroutine is zero-length
  • Download Code