Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: weird array processing question

by Gulliver (Monk)
on May 05, 2011 at 21:45 UTC ( [id://903252]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %seen;
    $seen{$_}++ foreach @array_whatsit;
    
  2. or download this
    my @duplicates = grep {$_ if $seen{$_}>1} keys %seen;
    print "There are ", @duplicates+0, " duplicates.\n";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://903252]
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: (2)
As of 2024-04-20 05:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found