use Win32::Registry; use strict; my $pval; $::HKEY_CURRENT_USER->Open("SOFTWARE\\Microsoft\\Windows NT" ."\\CurrentVersion\\Windows", $pval) or die "Can't open this key: $^E"; my ($type, $value); $pval->QueryValueEx("Device", $type, $value) or die "No Device Found: $^E"; print "Here's the default printer for this user: $value\n";