I presume you mean Win32::Registry. According to the first line of that module's documentation, it's obsolete. Win32::TieRegistry is recommended as an alternative. Here's an example using Win32::TieRegistry:
use Win32::TieRegistry;
$Registry->{"LMachine/Software/MyCompany/MyProduct/$key"} = $strval;
#or
$Registry->{"LMachine/Software/MyCompany/MyProduct/"}{$key} = $strval;