411 REFERENCE · Wikibooks
Perl Programming/Keywords/join
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Perl ioctl keys Keywords
The join keyword
join joins the elements of LIST with the separators from EXPRESSION. The new string is returned.
Syntax
join EXPRESSION, LIST
Examples
The print
$login = "anton";
$passwd = "j4\/D\\S";
$uid = 1721169842;
$gid = 8421691721;
$gcos = "nothing";
$home = "\\";
$shell = "ksh";
$rec = join(':', $login, $passwd, $uid, $gid, $gcos, $home, $shell);
print $rec returns the colon-separated string elements of the list: anton:j4/D\S:1721169842:8421691721:nothing:\:ksh
See also
split
Perl ioctl keys Keywords