in reply to Re^2: Comparing lines in txt.file
in thread Comparing lines in txt.file
I don't want to be rude, but you said this is for an assignment. If you don't know Perl well enough to even try something that we can help you with, then you probably need to go back to the beginning and start over. If we just give you the solution, that may satisfy your teacher/boss this time, but you'll be even further behind for the next assignment.
This is a pretty straightforward task: read the lines, parsing out the IP addresses and saving them to a hash, checking to see if they already exist as a hash key and alerting if one does. The parsing could be done with split or a regex (I'd vote for split here). All pretty basic Perl stuff.
Available for small or large Perl jobs; see my home node.