Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 surveying the Monastery: (5)
As of 2015-07-28 07:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (252 votes), past polls