The problem with s/\\u(.{4})/"\x{$1}"/eis that the backslash escape \x{$1}is evaluated at compile time, giving NULL bytes:
$ perl -E 'printf "%vX\n", "\x{$1}"'
0
x (s/\\u(.{4})/"\\x{$1}"/ge), escape-, :
use feature qw(say);
$kv = '\u0026';
$kv =~ s/\\u(.{4})/"\\x{$1}"/ge;
say $kv;
:
\x{0026}
"\x{0026}" , Perl, . eval(EXPR).
$kv =~ s/\\u(.{4})/ my $s = eval(qq{"\\x{$1}"}); die $@ if $@; $s /ge;
$kv =~ s/\\u(.{4})/ qq{"\\x{$1}"} /gee;
, :
$kv =~ s/\\u(.{4})/chr hex $1/ge;