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

Re: Having repeated intances become one in Array

by tadman (Prior)
on Aug 09, 2002 at 18:56 UTC ( [id://189004]=note: print w/replies, xml ) Need Help??


in reply to Having repeated intances become one in Array

#!/usr/bin/perl my @array = qw[ foo bar baz bar foo baz baz bad ]; sub dedupe { ${_}=do{{},[],{}};@{${_}}{@_,%_,@_}=$|;keys%{\%{${_}}} } print dedupe(@array);

Replies are listed 'Best First'.
Re: Re: Having repeated intances become one in Array
by Anonymous Monk on Aug 09, 2002 at 22:47 UTC
    i'm just a novice in perl...could you please explain how your code works ? i'm sure i could learn a lot from your code thanks :-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-24 19:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found