On Fri, Dec 12, 2008 at 12:10:19PM +0000, Paul Makepeace wrote: > sub intersect { > ... > }
use Quantum::Superpositions;@int = eigenstates(all(any(@list1), any(@list2))); Actually, I have no idea whether it'll work for the case of repeated elements in the lists, but it's a cool solution anyway, and just about fits on one line. And no, I didn't just copy that from the doco. Well, OK, I did, but I also contributed it to the doco in the first place, which is how I knew to look there. Do I win a prize? Is it safe to look at? -- David Cantrell | Official London Perl Mongers Bad Influence Hail Caesar! Those about to vi ^[ you!