Perl Programming/Keywords/join
The join keyword
editjoin joins the elements of LIST with the separators from EXPRESSION. The new string is returned.
Syntax
edit join EXPRESSION, LIST
Examples
edit 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