Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Find duplicate elements from an array

by PeterPeiGuo (Hermit)
on Nov 22, 2010 at 02:36 UTC ( [id://872865]=note: print w/replies, xml ) Need Help??


in reply to Find duplicate elements from an array

You have to show effort. Here is some tips:

Hash is perfect in this case. Use the "entry" as the key, and put the page numbers in an array. So we are talking about a hash of arrays here.

Traverse through the file line by line, and use a simple regex to separate 'entry" from the page number.

Peter (Guo) Pei

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-03-29 09:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found