my %currec; foreach my $row (@{$data_all}) { say $row; %currec = %{$row}; foreach my $columns (keys %currec) { my $text = $currec{$columns}; say $text; if(undef($text)) { say "$columns is NOT DEFINED"; } elsif (length($text) < 1) { say "$columns DEFINED, but empty"; } } exit; }