A Perl built-in function.

The first scalar argument is a separator. The rest of the arguments is a list.

The function joins each element in list putting the separator in the middle, returning the result. This is very useful when you want to convert a list to scalar.

For inverse operation, see split.


$ perl
my @channellist = ("Red", "Green", "Blue", "Alpha");
my $channels = join " and ", @channellist;

print "$channels\n";
Red and Green and Blue and Alpha