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

How about something like this:

sub check_uniform { my @array = @_; my $first = $array[0]; for(@array) { return 0 unless $_ eq $first; } return 1; }