Perl Christmas Quiz

David Cantrell david at
Fri Dec 12 14:33:07 GMT 2008

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!

More information about the mailing list