Joe Gottman pointed out:
No. It returns empty string. You could think of C<join> as being
implemented:
sub join (Str $sep, [EMAIL PROTECTED]) { reduce { $^a ~ $sep ~ $^b } "",
@list }
>
If this were the case, then
join '~', 'a', 'b', 'c'
would equal '~a~b~c' instead of 'a~b~c'
Good point. Thanks. Make that:
sub join (Str $sep, [EMAIL PROTECTED]) {
reduce { $^a ~ $sep ~ $^b } @list || ""
}
Presuming (of course) that my earlier plea that || should preserve context
across both operands is granted. ;-)
Damian