On Tue, Apr 23, 2013 at 04:56:55PM +0530, kavita kulkarni wrote:
> Hello All,
> 
> Can you help me in finding the most time effective way to retrieve the
> key-values from hash in the same sequence in which data is inserted into
> the hash.

Hashes are unordered, so you cannot directly do what you are asking.

Time effective for whom?  If it's for you, take a look at
https://metacpan.org/module/Tie::IxHash

If you're talking about execution speed, go with the simple solution
first and time and profile the solution before looking to optimise it.
You may find that the simple solution is good enough.

-- 
Paul Johnson - p...@pjcj.net
http://www.pjcj.net

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to