in reply to Re^2: how to sort hash of array by value
in thread how to sort hash of array by value

The hash order is always random, and has nothing to do with the order in which that hash was created.

Compare the following snippet with the original:

use Data::Dumper; my %colorhash = ( CCgray => [ "0","0","0" ], CCwhite => [ "1","0","0" ], CCgrey => [ "0","2","0" ], CCBlue => [ "0","0","3", ] ); my @light2dark = keys %colorhash; print Dumper \@light2dark;

PS Have you enclosed your original program within <code>...</code> tags yet?