这个还真不知道。。。看Perl技术内幕上说的,each 的特点是能同时得到键和值,而keys函数只有一个模糊的评价:"很棒的"。。。


On 9月25日, 下午11时04分, Michael Zeng <[email protected]> wrote:
> 书上说, hash大了,用each 来遍历,  即
> while ( ($key,$val) = each(%hash) ) {
>
> 是不是真的效率高很多? 要多大的hash 用each 才有效果?
>
>
> --
>            Yours Sincerely
>                    Zeng Hong
--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“PerlChina Mongers 讨论组”论坛。
 要在此论坛发帖,请发电子邮件到 [email protected]
 要退订此论坛,请发邮件至 [email protected]
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

回复