in reply to Sorting Color codes

Hrm. Maybe I'm missing something, but what's wrong with a simple sort?

perl -e 'print sort qw(#FF0000 #00FF00 #0000FF #FF00FF #FFFF00)'

It returns the same sorted-order as your code (namely: #0000FF, #00FF00, #FF0000, #FF00FF, #FFFF00) and it's simpler.

bbfu
Seasons don't fear The Reaper.
Nor do the wind, the sun, and the rain.
We can be like they are.