Perl join 函数
发布时间:2020-12-15 23:51:30 所属栏目:大数据 来源:网络整理
导读:[oracle@jhoa 14]$ cat a3.pl @array=qw/a b c d e f g/;$var = join("9",@array);print "$var is $varn";[oracle@jhoa 14]$ perl a3.pl $var is a9b9c9d9e9f9g join EXPR,LIST Joins the separate strings of LIST into a single string with fields sepa
[oracle@jhoa 14]$ cat a3.pl
@array=qw/a b c d e f g/;
$var = join("9",@array);
print "$var is $varn";
[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 表达式,列表
拼接函数
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
