We don't bite newbies here... much | |
PerlMonks |
Re: confused with summing certain elements from an arrayby erroneousBollock (Curate) |
on Nov 20, 2007 at 12:45 UTC ( [id://651913]=note: print w/replies, xml ) | Need Help?? |
I want to make a hash contains as keys the unique elements from the @out and as values the sums of the letters from the @out1. Also I want the hash to be sortedYou can do this:
That looks silly to me though... why would the data be in parallel arrays to begin with?
Also I want the hash to be sortedHashes aren't sorted. You can iterate the keys of the hash in order as follows:
-David
In Section
Seekers of Perl Wisdom
|
|