Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re^6: Unique array w/o repeated elements and still keep the original order!

by demerphq (Chancellor)
on Aug 09, 2002 at 21:28 UTC ( #189060=note: print w/replies, xml ) Need Help??


in reply to Re^6: Unique array w/o repeated elements and still keep the original order!
in thread Unique array w/o repeated elements and still keep the original order!

Heh, its to avoid the code you posted (and the implicit overhead of going through the list twice) that makes me use map{} instead.

I assume you somehow tried to change the value of constants or something like that?

BTW, i know the above could be represented as premature optimization, but the idea of iterating over a list twice for no good reason makes me unhappy.

:-)

Yves / DeMerphq
---
Software Engineering is Programming when you can't. -- E. W. Dijkstra (RIP)

  • Comment on Re: Re^6: Unique array w/o repeated elements and still keep the original order!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://189060]
help
Chatterbox?
[Discipulus]: at 7th floor seagulls eat mice
[Discipulus]: just in Eataly: brain surgery while playing clarinet..
[erix]: installing perfect pitch?
[karlgoethebier]: ...good Hot tuna. Note the stacks & racks in the background

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (13)
As of 2017-11-17 20:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (272 votes). Check out past polls.

    Notices?