Hashes have no internal sorting. However you can do sort keys when getting data out but this wont but it in chronological order.

Best way is it use your 'count tag' idea. Unless someone else has a better idea?

I have to say 'ORDERING Hash' has to be the best email subject I've seen for a while :P

On 25/05/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi
I am trying to order the keys of a hash in the order it was added
.i.e, I am adding elements in the hash one by one and I want the printing of the hash in the same order
what should I do to get this happening
I thought of adding a count tag to each key
But what can be a simpler solution
 
Thanks and regards
Sasi

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to