Deprecated: Function ereg() is deprecated in /rscs/rs/websites/lmpx.com/code/nav/common.inc on line 99
Deprecated: Function ereg() is deprecated in /rscs/rs/websites/lmpx.com/code/nav/common.inc on line 82
Hi,
If I have a loop that for each run creates
while (<FILE>){
Normally, if I only want to sort $myhash through it's values, I would do something like:
foreach (sort { $a <=> $b } keys %myhash){
print "$myhash{$_}\n";
}
what if i want to sort the anonymous hash $myhash{$mykey}-> through it's value. In my first loop above, each key of %myhash has a value of an anonymous hash. The key for this anonymous hash is called 'subkey'. the value of course is $value. I want to sort this anonymous hash by $value.
Any idea how to do that?
|