#!/local/bin/perl -w $build = ''; print "Which build (enter full path name)? \n" ; chomp($build = ); open(FILE, "/home/me/stuff/input.txt") || die "Could not open input file\n"; open(BUILD_FILE, $build) || die "Could not open input file\n"; %file_list = (); %build_file = (); while(){ $file_list{$_} = 1; } while(){ $build_file{$_} = 1; } foreach $bkey (sort keys %build_file) { foreach $line(keys %file_list){ if ($line =~ $bkey){ print "YES\n"; } else{ print "NO\n"; } } } close(FILE); close(BUILD_FILE);