In Perl 5, list assignment in scalar context evaluates to the number of list elements on the right-hand side. That enables an idiom that I rather like:
1 == (my ($script) = $page->find('//script')) or die "Other than exactly one script element found"; Can a similar expression that avoids an intermediate array variable be written in Perl 6?