<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # Perl `while`循環 > 原文: [https://beginnersbook.com/2017/02/while-loop-in-perl-with-example/](https://beginnersbook.com/2017/02/while-loop-in-perl-with-example/) 在上一個教程中,我們在 Perl 中討論了[`for`循環。在本教程中,我們將討論`while`循環。如前一個教程中所討論的,循環用于重復執行一組語句,直到滿足特定條件](https://beginnersbook.com/2017/02/for-loop-in-perl-with-example/)。 #### `while`循環的語法: ```perl while(condition) { statement(s); } ``` ### `while`循環的執行流程 在`while`循環中,首先計算條件,如果它返回`true`,則`while`循環中的語句執行。當`condition`返回`false`時,控制流退出循環并跳轉到`while`循環后的下一個語句。 **注意**:使用`while`循環時要注意的重點是我們需要在`while`循環中使用遞增或遞減語句,以便循環變量在每次迭代時都會發生變化,并且在某些情況下返回`false`。這樣我們就可以結束`while`循環的執行,否則循環將無限期地執行。 #### 例 ```perl #!/usr/local/bin/perl $num = 100; while( $num > 95 ){ printf "$num\n"; $num--; } ``` **輸出:** ```perl 100 99 98 97 96 ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看