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

perl -pe "/yes$/../no$/ and s/no$/yes/"
We're building the house of the future together.