in reply to Spotting an empty array as argument
You can't pass arrays (or hashes) to subs, only a sequence of zero or more scalars. There is no difference between
f($a, $a, $a, ...)
so you can't distinguish
frommy @empty; f(@empty)
At best, you can use prototypes to change what scalars are passed to a sub.
will allowsub f(;\@)
andf(@a) # Calls &f(\@a)
but notf() # Calls &f()
What you want to achieve, however, can't be achieved using prototypes. You'd have to use something like Devel::CallParser.
Seeking work! You can reach me at email@example.com