Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: How to hash without the hash- basic

by Util (Priest)
on Oct 26, 2011 at 19:58 UTC ( #933982=note: print w/ replies, xml ) Need Help??


in reply to Re: How to hash without the hash- basic
in thread How to hash without the hash- basic

use v6; my @array = < 1 3 4 55 4 3 4 22 1 3 4 3 2 2 3 34 >; my @y = @array.classify({$_})\ .categorize({ .value.elems==1 || Nil }).[0].value».key; say "{@y.sort.join(',')} are the numbers that appear only once" if @y; #my @y = @array.classify({$_}).grep({ .value.elems == 1 })».key;


Comment on Re^2: How to hash without the hash- basic
Download Code
Re^3: How to hash without the hash- basic
by moritz (Cardinal) on Oct 27, 2011 at 04:48 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2014-09-22 23:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (208 votes), past polls