$foo{$_} = $foo{$_} // '' for keys %foo; [download]
In reply to Convert undef to empty string in a hash by ibm1620