是啊,最快的就是 sort -u  了



2009/11/6 Michael Zeng <[email protected]>

> use List::MoreUtils qw/ uniq / ;
>
> my @data = <F> ;
>
> my @unique = uniq  @data;
>
>
>
>
>
>  2009/11/6 linhy <[email protected]>
>
>> 将文件中重复的行,替换,只保留一行.我的思路是,对文件逐行与其它行分析,然后写入到另一个文件.但感觉这样效率不高。请问各味大虾有没有好一点的思
>>
>> 路或是方法?谢谢先
>> >>
>>
>
>
> --
>            Yours Sincerely
>                    Zeng Hong
>



-- 
           Yours Sincerely
                   Zeng Hong

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“PerlChina Mongers 讨论组”论坛。
 要在此论坛发帖,请发电子邮件到 [email protected]
 要退订此论坛,请发邮件至 [email protected]
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

回复