点击运行
#!/usr/bin/perl $a = 10; while( $a < 20 ){ if( $a == 15) { # 跳出迭代 $a = $a + 1; next; } print "a 的值为: $a\n"; $a = $a + 1; }
运行结果 :
正在执行...