in reply to Re: Perl6: Smartmatch scalar to array
in thread Perl6: Smartmatch scalar to array
Indeed, it is precisely because Perl 6 has junctions that we do not need to assume junctional semantics on smartmatched lists; Perl 5 does not have junctions, so it does assume that. Instead, Perl 6 can use a list to smartmatch another list, which is also a useful behavior--especially since wildcards are supported. For instance,
(1,2,3,4,5) ~~ (*,2,3,*) returns true.
In Section
Seekers of Perl Wisdom