in reply to Testing the Uniformity of an Array by its Elements

You can use a hash:

sub is_uniform { my %hash; @hash{@_} = (); !(1 - keys %hash); }
That will return true only if %hash has exactly one key.

After Compline,
Zaxo