A follow-up to Ari's post on Los.
In this week's parsha, (25:29-30) the special laws of the sale of a house in a walled city are discussed. רש"י points out that the laws specifically concern a city that had a wall in the time of יהושע. This, explains רש"י, is based on a דרשה of חז"ל on a קרי/כתיב in פסוק ל. The house is referred to as being in a "עיר אשר לא חומה." The word lo is written לא, suggesting that it is a city with no wall. But it is read as לו (whatever the difference is between the two,) which implies a city that has walls. חז"ל learn from here, even though it doesn't have now, if it had before, i.e. at the time of יהושע, then it is subject to the special laws.
ר' צבי פסח פרנק in הר צבי explains why the קרי and כתיב were set up the way they were (as opposed to the other way around.) The פסוק is referring to a city that is not currently walled. That is why it is written לא. The written text is what we see with our eyes. We see לא because we see that there is no wall. But the קרי is what we hear. We hear that there was a wall before in the time of יהושע and that's why it is read לו.