It looks like you've made a lot of headway on refs, don't sell yourself short. It just looks like maybe you needed to back away from the problem and see that the reason why it wasn't working was that you were trying to stick a square peg in a round hole, so to speak. It's easy to do when you're dealing with that level of abstraction, which is where references trip a lot of people up.
Also, your question could have been a little clearer. Without giving away any proprietary information, some background as to what you were trying to do would have been nice. It looks like what you really wanted was a way to store by a named index because then you would have a pre-sorted list of indexes. Whenever you find yourself tempted to do something like this, it might be worth thinking about whether a hash might suit you better. Of course, your email was kind of cryptic, so it's hard to tell. -----Original Message----- From: Tom Allison [mailto:[EMAIL PROTECTED] Sent: Monday, August 01, 2005 7:03 PM To: Tim Johnson Cc: beginners perl Subject: Re: reference trouble [Tim Johnson] <snip> I've changed it out to a hash and create a seperate array of keys that are sorted: my @keys = sort { $b <=> $a } keys %hash And this works just fine. But I still have some more learning to do on refs... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>