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

Re: How do I find unique Array in Array of Array?

by mohan123 (Novice)
on Jun 13, 2006 at 13:32 UTC ( [id://555038]=note: print w/replies, xml ) Need Help??


in reply to How do I find unique Array in Array of Arrays?

use strict; use warnings; use Data::Dumper; my @AoA = (['a','b','c'], ['a','b','c'], ['a','b','d'], ['a','b','d']); my %temp=(); my @aoa=map{[split $;,$_]}grep{++$temp{$_}<2} map {join $;,@$_} @AoA; print Dumper \@aoa;

Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2024-04-16 09:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found