print"\n"; print "Please enter file name and path:"; chomp($filename = ); #Gets File to Search print "File Name: $filename"; #Prints the File Name print "\n"; #Skips Line open DAFILE, "$filename"; #Opens the file to Search open(testfile,"Hints.txt") or die "Can't find file\n"; #Opens Hints.txt $i=0; #Var array counter @daarray = (); #Var Array while(){ #While Hints.txt file is open $daarray[$i] = $_; #Loads each line of Hints.txt into array $i++; # array's index } close(testfile); #Close Hints.txt while() #While the File is Open { $input = $_; #Get next line of the file for($j=0; $j<=$i; $j++) #for each item in array { ($first,$last) = split(/\ == /,$daarray[$j]); #Split Hints.txt line if($input =~ m/$first/i) {printf "Found: %s\r", $last;} } } print "Search Complete\n"; #Print close DAFILE; #close DAFILE