--- name: join status: documented runtime: pp source: src/runtime/pp/strings/join.rs --- ```{index} single: join; Perl built-in (pp runtime) ``` # join ## Synopsis ```perl $str = join(',', @array); $str = join(' ', 'hello', 'world'); $str = join('', @chars); # no separator ``` ## Description Concatenates a list of values into a single string with a separator. Takes a separator string followed by a list of values (from a pushmark-delimited argument list on the stack). The separator is inserted between each adjacent pair of values. Array arguments are flattened. Returns the resulting string; an empty string when no list values are given. Uses `Cow` for the separator and parts to avoid allocation when the underlying SVs are already string-typed. ## See also split, sprintf