in reply to if condition problem

Update: Looks like I was a little slow off the mark to fglock here :)

You have a problem with the precedence of the trinary operator as compared to the = I believe.

Adding brackets will help you no end :) Like this...
for (values(%{$hash})) { /yes/i ? ($_ = 'Yes') : ($_ = 'No'); }
HTH,
Neil