Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: How do I pull out unique values in a multidimentional array

by repson (Chaplain)
on Jun 29, 2001 at 11:31 UTC ( #92546=note: print w/replies, xml ) Need Help??


in reply to How do I pull out unique values in a multidimentional array

If you are willing to rely on the values being sorted and don't want to create a hash of the values like the other solutions you could do something like this.
my @unique; for (@array) { push @unique, $_->[1] unless $unique[$#unique] == $_->[ +1] }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://92546]
help
Chatterbox?
[karlgoethebier]: marto: ...but you are not the interviewer, right?
[hippo]: systemd == end of RHEL
[karlgoethebier]: Discipulus: explain...
[marto]: karlgoethebier no :)
[karlgoethebier]: marto: thanks

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2017-12-14 11:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (389 votes). Check out past polls.

    Notices?