Perl continue blocks are usually executed before the conditional statement is judged again.
In Execute the above program, and the output is as follows: Execute the above program, and the output is as follows:
最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。 continue statement can be used in the while and foreach in a loop. 5.27.1. Grammar #
while in circulation continue the syntax format of the statement isas follows:while(condition){ statement(s); }continue{ statement(s); }
foreach circulation , the continue syntax format of the statement is as follows:foreach $a (@listA){ statement(s); }continue{ statement(s); } Example #
while use in a loop continue statement:Example #
#/usr/bin/perl$a=0;while($a<3 ){print"a='$a\\n";}continue{$a=$a+1;}
a = 0 a = 1 a = 2
foreach use in a loop continue statement: Example #
#/usr/bin/perl@list=(1,2,3,4,5);foreach$a(@list){print"a =$a\\n";}continue{lastif$a==4;} a = 1 a = 2 a = 3 a = 4