in reply to Function that accepts both hashes/arrays and hashrefs/arreyrefs
You can test to see if a value is a reference using ref (eg: if (ref($something) eq 'HASH').
Provided that the array or hash contents being passed into this function are not allowed to be array or hash references themselves, this will work.
Trying to distinguish between an array reference and an array (list) of array references will be a challenge. Particularly a list of size 1.