일일이 dot operator 로 연결하는 것보다 훨씬 짧게 코딩 가능.
my @names = qw/Apple Melon Orange/;
my $names = join " and ", @names;
print($names);
print("\n");
결과 : Apple and Melon and OrangePerl join Function
my @names = qw/Apple Melon Orange/;
my $names = join " and ", @names;
print($names);
print("\n");
결과 : Apple and Melon and Orange
No comments:
Post a Comment