Harald Ashburner [HA], on Friday, March 11, 2005 at 15:26 (+1100) thinks about:
HA> Other solutions that come to mind are: HA> create a separate data structure with the {order => key, etc HA> so I would access the strurcture with the data in it by iterating HA> through the order datastructure. This would work, but seems a bit HA> ugly. You can't store hashes in order, but you can read them (for example you have ID in order you want to - you can do that in your SQL statement) example: foreach $food (sort keys %food_color) { print "$food is $food_color{$food}.\n"; } or you can use module like Tie::IxHash, I used Tie::Hash::Indexed and works good. -- ...m8s, cu l8r, Brano. ["Bother!" said Pooh, as he found that a 19mm Willmerdinger unit would.] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>