my %HashCopy = map {tr/ /_/? $_:$_ => $OrigHash{$_}} keys %OrigHash; # Above line copies %OrigHash and Replaces Spaces with Underscore in hash Key