my $rootkey = "LMachine/Software/Microsoft/Windows NT/CurrentVersion/Winlogon"; $Registry->{"$rootkey//testkey2"} = [pack("L",0), "REG_DWORD"];