my $SysEnv= $Reg->{"//$Host/LMachine/System/CurrentControlSet/" . "Control/Session Manager/Environment/"} # no connect, use {}, not () or die "Can't connect to $Host 's registry or can't open Registry key," . " Session Manager/Environment: $^E\n";