in reply to Re: All array elements the same?
in thread All array elements the same?
If you were checking a true/false condition based on the presence of any of the keys, the 1 would be needed, but all we're interested in here is the keys.@check{@array_to_test} = (); # Sets them all to undef $all_the_same = (keys %check <= 1); # empty @ary = true too? heck, wh +y not?
|
|---|