in reply to Function that accepts both hashes/arrays and hashrefs/arreyrefs
Aside from the fact that the idea of "accepting an array ... as its *sole* argument" is a bit contradictory by itself (unless the array is of length one), and that I don't see how you could possibly distinguish between someone passing you a array, and someone passing you a hash, the simple declaration of
would accept everything.sub myfunc { .... }
|
|---|