< Perl Programming < Keywords
![](../../../I/Crystal_Clear_action_apply.png.webp)
The print
The join keyword
join joins the elements of LIST with the separators from EXPRESSION. The new string is returned.
Syntax
join EXPRESSION, LIST
Examples
![](../../../I/Crystal_Clear_action_apply.png.webp)
$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
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.