点击运行
#!/usr/bin/perl @list = (2, 12, 36, 42, 51); # 执行foreach 循环 foreach $a (@list){ print "a 的值为: $a\n"; }
运行结果 :
正在执行...