Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^3: Comparing lines in txt.file

by aaron_baugher (Curate)
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
Replies are listed 'Best First'.
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?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (13)
As of 2015-10-09 13:40 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (242 votes), past polls