print "\nSEARCHING...\n"; open (FILE, "security.txt"); print "\n"; ###### Define names and their file paths ###### %exe = ( "Catalog", 'C:\Program Files\Internet Explorer\IEXPLORE.EXE', "Crime", 'D:\crime\Reader\AcroRd32.exe'); ###### Try to count the occurance of file paths ###### $count=0; while() { chomp; #if ($_ = (values %exe)) { $count++; } ###### print names and counts ####### foreach $key (keys %exe) { print "Name: $key\t Count: $count\n"; } close(FILE); print "\nDONE.\n";