perl next语句

前端之家收集整理的这篇文章主要介绍了perl next语句前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
[oracle@jhoa 7]$ cat 7.pl 
for ($i = 1;$i <= 10;$i++){ #从1数到10
next if ($i == 5);
  print "I can count to $i!\n";
}
[oracle@jhoa 7]$ perl 7.pl 
I can count to 1!
I can count to 2!
I can count to 3!
I can count to 4!
I can count to 6!
I can count to 7!
I can count to 8!
I can count to 9!
I can count to 10!

猜你在找的Perl相关文章