#!/perl # $file1 = 'IPs.txt' ; # Name the file with IP addresses to be looked up open(INFO, "<$file1" ) ; # Open the file @lines1 = ; # Read it into an array close(INFO) ; # Close the file %file2 = 'Source.txt' ; # Name the file with source addresses open(INFO, "<%file2" ) ; # Open the file @lines2 = ; # Read it into a two dimentional array close(INFO) ; # Close the file foreach $line1 (@lines1) # assign @lines1 to $line1, one at a time { foreach $line2 (@lines2) # assign @lines2 to $line2, one at a time { while $line1 != $line2 ; # Compare the entry from log group to source group { open(APPEND, ">>conversion.txt") ; print(APPEND "$line2" ; close(APPEND); } } }