in reply to If statement not working

If you have a hash like:
%mapping=( 'baby blue'=>'BB', 'baby pink'=>'BP', 'dark blue'=>'DB', #and so on... );
Wouldn't that reduce your if-else series to this:
$trimmedcolr=$mapping{$colr};
Also, if new colors are added, you'd only need to add an entry in the hash.