in reply to Golf Challenge: all elements of an array equal
Update:sub all_ne { map{$_ ne$_[0]}@_ }
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.sub all_ne { map$_[0]ne$_,@_ }
|
|---|
| 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 |