Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 God said, "Let Newton be!"...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2017-10-18 06:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (242 votes). Check out past polls.

    Notices?