in reply to All array elements the same?

Easiest, and cheaper than the hash solution:
$same = not grep { $_ ne $array[0] } @array;
    -- Chip Salzenberg, Free-Floating Agent of Chaos