Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^4: Create unique array --the hard way!

by kcott (Archbishop)
on Mar 08, 2014 at 09:32 UTC ( [id://1077503]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl
    
    ...
        my $last = '';
        my @unique = map { $last eq $_ ? () : ($last = $_) } @sorted;
    }
    
  2. or download this
                      Rate splice_unique  shift_unique    map_unique
    splice_unique  93699/s            --           -5%          -20%
    shift_unique   98642/s            5%            --          -16%
    map_unique    117028/s           25%           19%            --
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-18 20:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found