|Perl: the Markov chain saw|
You are walking in the land of perlmonks. You come to a fork in the road. One path leads you to the capital city, the other path leads you deep into treacherous woods and certain death. Two monks are standing at the fork in the road, one always lies, one always tells the truth.
You can ask only one monk only one question. How do you determine the correct road to take?
You ask the monk standing on the left, "If I were to ask him which way to go, what would he say?" The monk on the left replies, "That you should take the path to the right."
You start to walk off down the path to the left, but before you go, the monk on the right volunteers, "Dear monk, I would tell you that he would tell you that you should take the path to the right."
You pause and face him. "He answered my question first, and that's what he told me."
"Yes," replies the monk on the right, "That was also me answering your question".
You beat the monk on the right with your clue-by-four, thank the one on the left, and continue to the capital city.
[ed: removed the spoiler tag, since in retrospect I thought it spoiled the joke.]