use strict; use warnings; use Win32::Registry; # The following example reads and displays the value in the DWORD registry value # HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl\AutoReboot. my $CrashControl; $::HKEY_LOCAL_MACHINE->Open( q~SYSTEM\CurrentControlSet\Control\CrashControl~, $CrashControl ) or die "Can't open CrashControl: $^E"; my ($type, $value); $CrashControl->QueryValueEx("AutoReboot", $type, $value) or die "No AutoReboot: $^E"; print "Here's AutoReboot: $value\n";