#!/usr/bin/perl
#
# eg6: unique elements example, sixth version..
#

use strict;
use warnings;

my @array = ( 17, 5, 3, 17, 2, 5, 7, 6, 6, 10, 3 );

my %freq; $freq{$_}++ for @array;	   # build array element -> frequency
my @uniq = grep { $freq{$_} == 1 } @array; # build @uniq, unique elements
my $str = join(',',@uniq); print qq($str\n);
