my @list = ('a', 'b', 1, [1,2,3], 'c', {z=>1,y=>2}); print myfunc(\@list); # prints 'a,b,1,ARRAY(1-2-3),c,HASH(z1-y2)';