Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Comparing lines in txt.file

by aaron_baugher (Deacon)
on Aug 16, 2012 at 10:34 UTC ( #987733=note: print w/ replies, xml ) Need Help??


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.

Aaron B.
Available for small or large Perl jobs; see my home node.


Comment on Re^3: Comparing lines in txt.file
Re^4: Comparing lines in txt.file
by zakishah (Novice) on Aug 17, 2012 at 03:20 UTC
    Thank you very much you are very right i tried many perl tutorials but time is important factor which pushed me to seek help here i would be very glad if you give me solution along with explaination that can boost my knowledge too. Thanks

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://987733]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2014-11-27 13:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (184 votes), past polls