http://www.perlmonks.org?node_id=162994


in reply to Re: Re: TIMTOWTDI and other languages
in thread TIMTOWTDI and other languages

@intersection = @alphas =~ @betas;
Does anyone know if this will actually work?

I seriously doubt it. Larry has never even hinted that =~ will operate like that in a list context.

Of course, if superpositions do get in then this:

@intersection = eigenstates(any @alphas =~ any @betas);

would work.

And it's possible that the eigenstates operator is superfluous; that a superposition in a list context just yields its eigenstates automatically. In which case you only need this:

@intersection = any @alphas =~ any @betas;