in reply to Re^2: Joining Arrays? (perl6)
in thread Joining Arrays?
Such cross-like operations are common enough that there is also a cross meta-operator in Perl 6 to trick an ordinary binary operator into doing it. So instead of saying:
you can just saymy @combined = (@urls X @ids).map: {$^a ~ $^b};
That is, just put X in front of the ordinary operator to make it a cross operator.my @combined = @urls X~ @ids;
Update: changed old X~X form to new X~ form.
|
---|
In Section
Seekers of Perl Wisdom