join

Synopsis

$ join("string", @array|&closure)

joins the elements of @array with "string"

Parameters

"string" - the delimeter to join the elements together with.

@array - an array of elements to join together

&closure - a generator function to create elements to join with the specified string

Returns

a scalar string

Examples

$string = join(', ', @("ape", "bat", "cat", "dog")); println($string);

ape, bat, cat, dog

See Also