any(all(1,4)) evaluates to any() since in scalar context there's nothing that can evaluate to all(1,4), i.e. to 1 and 4 simulataneously (any is conjunctive).
I've just tried out the example in de docs, and is doesn't seem to work:
Changing any to all for @features doesn't help matters.my @features = ("tall", "handsome", "rich"); my $ideal = any(all("tall", "handsome", "rich" all("rich", "old"), all("smart", "rich", "Australian")); if (any(@features) eq $ideal) { print "success\n"; } else { print "failure\n"; } print any(@features), "\n"; print $ideal, "\n"; __END__ failure any(handsome,tall,rich) any()
I think we'll need Damian on this, -gjb-
Update: Removed the strike-through of the explanation since it seems to be correct after all. The docs are probably wrong.In reply to Re: Nested Quantum::Superpositions
by gjb
in thread Nested Quantum::Superpositions
by welchavw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |