P is for Practical | |
PerlMonks |
Re: Re: (Golf) Nearest Neighborsby thospel (Hermit) |
on Oct 27, 2003 at 19:28 UTC ( [id://302483]=note: print w/replies, xml ) | Need Help?? |
Just saw this thread. Here is a destructive (only works once) solution at 46:
sub nn{$a|=$"x$_.1for@_;$b.=$"until$a=~/1$b(1)/;@a=@-}
In Section
Obfuscated Code
|
|