in reply to Problem changing only first occurence of pattern in file

perl -ne 'if(s/No/Yes/){ print; last; } else {print} }{print while(<>)' user.txt

This will loop, through printing lines, and change the first one that has a No, and then just finish looping printing the lines as is.