is there an elegant way to avoid the empty list from returning true
Well, elegant, I don't know; beauty is in the eye of beholder. If you don't want the empty list to return true, then test for it:
@$x and @$x == grep { ref $_ eq 'HASH' } @$x- another intruder with the mooring in the heart of the Perl
In reply to Re: How to test all elements in a list are hashes?
by grinder
in thread How to test all elements in a list are hashes?
by bsdz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |