while(my ($i,$count) = each %input) { print OUT "$i\n" unless $count>1; }