in reply to Perl Golf-- testing array intersection
Both your and Errto’s solutions violate your spec: they will ignore duplicate elements in @x, but they report duplicate matches in @y.
The best I’ve come up with that works correctly is 49 characters (or 51 if you care about the context issue).
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl Golf-- testing array intersection
by Errto (Vicar) on Jan 30, 2006 at 22:17 UTC | |
by Aristotle (Chancellor) on Jan 30, 2006 at 22:43 UTC |