原帖由 charseller 于 2006-7-17 13:59 发表
哎,差距啊!
谢谢!! 改成 eq 就好了。
自己太疏忽了:(
原帖由 ulmer 于 2006-7-17 17:53 发表
Hallo,
using map and hash to simplyfine the code:
i.e:
perl -le '@d1=qw(1.1 1.2 1.3);@d2=qw(1.1 1.5); %h=map{$_=>1}(@d1,@d2); @d3=sort keys %h; print join "\n", @d3'
...
原帖由 huaxue 于 2006-7-18 14:49 发表
楼上的楼上的,这句话是什么意思啊?
%h=map{$_=>1}@d1
在比较大小方面,eq与==有什么区别吗?
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |