foreach my $row (@data){ if (ref($row) ne 'HASH'){ print "$row not a href\n"; next; } }