Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Removing Duplicates from an Array

by ChOas (Curate)
on Sep 18, 2001 at 14:51 UTC ( #113083=note: print w/ replies, xml ) Need Help??


in reply to Removing Duplicates from an Array

Something like this: ?

sub mailNaughtyUser { my @addies = shift; #my @addies=@_; ? my %Seen; foreach my $address(@addies) { next if $Seen{$Address}++; # # Do that thing you do best once on every address # } }

btw that my @addies=shift; looks like a really neat trick
coz I don`t get it ;))

GreetZ!,
    ChOas

print "profeth still\n" if /bird|devil/;


Comment on Re: Removing Duplicates from an Array
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2014-12-19 06:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (72 votes), past polls