Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (11)
As of 2016-06-30 14:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (396 votes). Check out past polls.