[oracle@jhoa 14]$ cat a3.pl
@array=qw/a b c d e f g/;
$var = join("9",@array);
print "\$var is $var\n";
[oracle@jhoa 14]$ perl a3.pl
$var is a9b9c9d9e9f9g
join EXPR,LIST
Joins the separate strings of LIST into a single string with fields
separated by the value of EXPR, and returns that new string. Exam-
ple:
$rec = join(':', $login,$passwd,$uid,$gid,$gcos,$home,$shell);
Beware that unlike "split", "join" doesn't take a pattern as its
first argument. Compare "split".
join 表达式,列表
拼接函数
Perl join 函数
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
left join 后用 on 还是 where?
sql语法
SQL sql 结果集 -
perl的时间函数
1、time函数:返回从1970年1月1日起累计的秒数 使用:my
perl 格式化 格式化时间 Perl .net -
perl 函数
"文档" 函数参数 传递hash参数 return 如果没有使用 return 语句,则子程序的最后一行语句将作为返回值 静态变量 这个在js只能用闭包实现 析构返回值 递归 回调 闭包
perl函数 perl递归 perl回调 perl 静态变量