in reply to How to test all elements in a list are hashes?

I think the way you are going is pretty elegant, here is a version altered to return false(0) on an empty array

perl -le'@a=(a, {}, {});print (( @a==grep {ref $_ eq "HASH"} @a ) ? @a ? 1 : 0 : 0)'

Cheers,
R.

Pereant, qui ante nos nostra dixerunt!