You can use a hash:
That will return true only if %hash has exactly one key.sub is_uniform { my %hash; @hash{@_} = (); !(1 - keys %hash); }
After Compline,
Zaxo
In reply to Re: Testing the Uniformity of an Array by its Elements
by Zaxo
in thread Testing the Uniformity of an Array by its Elements
by neversaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |