tag:blogger.com,1999:blog-8722048993094113071.post8196577096237199556..comments2023-09-11T06:34:38.721-07:00Comments on The world is amazing: Perl: Remove duplicate elements from listUnknownnoreply@blogger.comBlogger2125tag:blogger.com,1999:blog-8722048993094113071.post-64584731782810002912010-11-18T03:31:20.317-08:002010-11-18T03:31:20.317-08:00Your code is not only buggy, but also excessively ...Your code is not only buggy, but also excessively long. You can do it in three code lines:<br /><br />my @arr = ( 1, 4, 2, 2, 3 );<br />my %tmp = map { $_, 0 } @arr;<br />@arr = sort(keys %tmp);Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8722048993094113071.post-10781417502044556932009-07-02T12:28:01.281-07:002009-07-02T12:28:01.281-07:00Thank you! Was looking for a lot of "remove d...Thank you! Was looking for a lot of "remove duplicate" functions and yours are great and works for me!Anonymousnoreply@blogger.com