in reply to All array elements the same?
{ my %hash; @hash{@array} = (); $same = (1 == keys %hash); } [download]