my @array = qw( this is an array );
for my $element (@array) {
print "$element\n";
}
# OUTPUT:
# this
# is
# an
# array
[mess] [perl] 迭代一个数组
猜你喜欢
转载自www.cnblogs.com/wander4096/p/9498131.html
今日推荐
周排行