use strict; use Win32::Registry; package myPackage; print $::HKEY_LOCAL_MACHINE; # not $HKEY_LOCAL_MACHINE