11:57am, Octavian Rasnita wrote: > Hi all, > > I have a hash that have multiple sub hashes and I want to sort it by a sub > key. > > For example, I have: > > $comp{$code}{$year}{profit}. > > And I want to sort the $code values after the value of the "profit" key. > > Is this possible directly, or I will need to create another hash for doing > this type of sort? > > Thanks. > > Teddy >
Octavian/Teddy: have you tried? I'm starting to notice a pattern. You ask a lot of questions (which is OK), but you never mention what you have already tried (which isn't so OK), and that leads me to suspect that you're not trying (which is very not OK). Two suggestions: get familiar with 'perldoc' and associated documentation for Perl. Buy a book or two, even. Try to solve the problem on your own. If you can't, then write to the *appropriate* forum (as someone else mentioned, this has nothing to do with CGI, so you should have posted to a different list). And when you write, post not only the problem, but what you've done to try to solve it. Paul Archer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>