Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Order of Calendars' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Order of Calendars
Authored by: n1mie on Sep 27, '06 04:07:30AM

I like the script, and I've already tweaked it for my purposes. I added in all my calendars, in the order which I prefer them to appear. But for some reason they are in a completely different order in the output. Seems like it ought to step through them serial from top to bottom, but that's not what happens.

(I also removed the conversion from 24hr to 12hr clock since I prefer the former.)

Thanks for the help.

---
--Chip



[ Reply to This | # ]
Order of Calendars
Authored by: ptroot on Sep 27, '06 06:16:40AM

Hash's do not have guarenteed order.



[ Reply to This | # ]
Order of Calendars
Authored by: dpb2009 on Oct 10, '06 07:27:53PM

its because they are stored in a hash. perl doesn't store a hash in the order you entered it, but rather in an order it finds useful for retrieving it quickly. you could re-write it with an array, and then it would be in the right order.
-d



[ Reply to This | # ]