weidagang2046的專欄

          物格而后知致
          隨筆 - 8, 文章 - 409, 評論 - 101, 引用 - 0
          數據加載中……

          Perl Tips 2006/8/19

          2?Perl language tips are met today.

          1.?a code snippet is as follows:
          ?
          $code[$idx] =~ /^\s*(.+?)\s*$/;
          $code[$idx] = $1;

          Seem it's to extract the content without leading and tailing white space. But the (.+?) is still not understood.

          2. a code snippet is as follows:

          my $currentframe;
          $currentframe = {
          ?_pc_ => 0,
          ?_func_ => 'main'
          ?};

          what's the type of $currentframe? handle to a hashtable??


          Answer: $currentframe is a reference to?an anonymous?hash. Usage: $$currentframe{_pc_} or $currentframe->{_pc_}

          posted on 2006-08-19 19:39 weidagang2046 閱讀(337) 評論(0)  編輯  收藏 所屬分類: Perl

          主站蜘蛛池模板: 鄂托克前旗| 黄浦区| 黄龙县| 岳阳县| 云阳县| 武夷山市| 泸溪县| 磐石市| 富平县| 广宗县| 门源| 赣榆县| 新乡县| 台北县| 河间市| 顺昌县| 泾阳县| 左云县| 永年县| 贡山| 旅游| 苗栗县| 巴楚县| 嘉义县| 福泉市| 广饶县| 蛟河市| 华池县| 新化县| 平谷区| 五指山市| 周口市| 高淳县| 元阳县| 永新县| 高雄市| 河北区| 沾化县| 北辰区| 乌海市| 扬州市|