in reply to Re: dup values
in thread dup values

A variation:
use strict; use warnings; my @critters = qw( ant camel snake camel llama cow sheep herring camel llama ); my %rec_of; my %dup_rec_of; for my $critter (@critters) { $dup_rec_of{ $critter }++ if $rec_of{ $critter }++; } printf "%s\n", join ', ', sort keys %dup_rec_of;
which prints:
camel, llama
Cheers