in reply to Re: Re: Problem using Q::SP's
in thread Problem using Quantum::Superpositions
I don't have the Q::SP source handy, but what's probably happening is that all() always returns an array, and then it's your assignment that determines whether that array is evaluated in scalar or list contexts.
In a scalar context, an array always returns the count of the elements, while in a list context, an element-by-element assignment is done, so
captures the first value of all()'s result in $x.my ($x)=all();
|
|---|