in reply to Golf Challenge: all elements of an array equal

Like MeowChow's, 17 characters, but this one can be run more than once without error:
sub all_ne { map{$_ ne$_[0]}@_ }
Update:
Upon reading the entire thread, this does seem similar to what tilly posted. Strange. This means that I can now say:
sub all_ne { map$_[0]ne$_,@_ }
Which is incredibly only 15 characters. Thanks to tilly for the obvious parameter re-ordering trick. I had been mashing around with grep during testing, but discarded it as too bulky.

Update-2:
For whatever reason, it seems I've implemented the function in the negative sense.

Replies are listed 'Best First'.
Re (tilly) 2: (Golf) All Elements of an Array Equal
by tilly (Archbishop) on Jul 14, 2001 at 15:02 UTC
    You should have stayed with grep. Try the following:
    sub f{ map$_[0]ne$_,@_ } print "Gotcha!\n" if f(1,2);