表达式为假的情况: 逻辑值为假 值为0 字符串为空‘’ 列表为空 undef [oracle@jhoa perl2]$ cat 3.pl @array=qw/1 2 3 4 5 6 7 8 9/; foreach $var (@array){ print "$var\n"; } print "循环外\n"; print "$var\n"; [oracle@jhoa perl2]$ perl 3.pl 1 2 3 4 5 6 7 8 9 循环外 [oracle@jhoa perl2]$ cat 4.pl print "使用标签:"; LABEL: for($i=1;$i<5;$i++){ for ($j=1;$j<5;$j++){ print "$j"; last LABEL if $i==3; } } print "\$i is $i\n"; [oracle@jhoa perl2]$ perl 4.pl 使用标签:123412341$i is 3