Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Get just the unique value

by CountOrlok (Friar)
on Apr 05, 2013 at 15:49 UTC ( #1027158=note: print w/replies, xml ) Need Help??


in reply to Get just the unique value

Use a hash instead:
my %res = (); for my $entry (@$data) { $res{$entry->{type}} = 1; } print join(',', sort(keys(%res)))."\n";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1027158]
help
Chatterbox?
and the grasshoppers chirp...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2017-02-26 01:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (370 votes). Check out past polls.