ivaneeo's blog

          自由的力量,自由的生活。

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            669 Posts :: 0 Stories :: 64 Comments :: 0 Trackbacks
          while gets
          if /Ruby/
          print
          end
          end

          ##等同代碼

          ARGF.each {|line| print line if line =~ /Ruby/ }
          ##ARGF
          ##An object providing access to virtual concatenation of files passed as command-line
          ##arguments or standard input if there are no command-line arguments. A synonym for
          ##$<.

          ##等同代碼
          print ARGF.grep(/Ruby/)
          posted on 2006-09-12 16:07 ivaneeo 閱讀(295) 評論(0)  編輯  收藏 所屬分類: ruby-寶石也鋒芒
          主站蜘蛛池模板: 礼泉县| 嘉定区| 寿宁县| 赤壁市| 恩施市| 乌什县| 定日县| 台北县| 玉溪市| 玛沁县| 饶河县| 都昌县| 明光市| 卫辉市| 固始县| 平阴县| 温州市| 花垣县| 宜宾县| 江门市| 巴彦县| 固阳县| 岫岩| 广汉市| 扬中市| 东港市| 岳池县| 固阳县| 正安县| 运城市| 古蔺县| 扎赉特旗| 屯昌县| 九寨沟县| 阜城县| 福建省| 即墨市| 郴州市| 新邵县| 长葛市| 吉首市|