use Encode; my $utf8key = "\x{05D0}"; my $usable_key = encode( 'utf8', $utf8key ); dbmopen(my %hash, "/tmp/mydb", 0666) || die "d'oh!"; $hash{$usable_key} = "bar"; dbmclose(%hash);