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