in reply to removing duplicate entries from an array
Here is one way:
use strict; use warnings; my @names = qw(Mary Mary Mary Mary Joe Joe Joe); my %unique; @unique{@names} = undef; @names = keys %unique; print join ", ", @names;
Prints:
Joe, MaryUpdate s/undef/()/ per Roy Johnson's reply
Perl is Huffman encoded by design.
In Section
Seekers of Perl Wisdom