# Delete the value and try the next one unless it has a non-printable, or a space delete $$hoh_ref{$key}{$value} and next unless /[^[:print:]]/ or /\s/; while ($$hoh_ref{$key}{$value} =~ /([^[:print:]])/g) { print "Unprintable !\n"; }