while (my ($k1, $v1) = each %$h1) { my @fields = split /,/, $v1; ... }