[first 3 lines as per your code] my $sysKey = $Registry->{"LMachine/SYSTEM/CurrentControlSet/Control/Print/Printers/"} ; my @Print_Printer = grep( m#^/#, keys %$sysKey); [last 3 lines as per your code] #### CAPTURE FAX BVRP/, Capture fax BVRP Extended/, Speedway!fax/, Brother HL-1250 series/, /, /StartOnBoot,/PrintersMask/ #### /StartOnBoot /PrintersMask