in reply to (almost) Unique elements of an array
#!/usr/bin/perl -w use strict; my @ar = qw/This this is a test test TEsT/; my @vals = uniq(@ar); $\ = "\n"; print (join " ", @vals); sub uniq { my %hash; return grep {!($hash{uc $_}++)} @_; } [download]