Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Fast Way to Return Unique Array of Array

by calin (Deacon)
on Sep 05, 2005 at 10:17 UTC ( [id://489192]=note: print w/replies, xml ) Need Help??


in reply to Re: Fast Way to Return Unique Array of Array
in thread Fast Way to Return Unique Array of Array

Nice, just a slight style improvement:

map { $h{join($;, @$_)}++ == 0 ? $_ : () } @_;

becomes

grep { ! $h{join($;, @$_)}++ } @_;

Replies are listed 'Best First'.
Re^3: Fast Way to Return Unique Array of Array
by pseudomonas (Monk) on Sep 05, 2005 at 12:19 UTC
    Could one replace join($;, @$_) with Dumper($_) (or some variant thereof), to allow for multiple levels of data structure?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-03-28 15:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found