Dangling modifier
A dangling modifier is a modifying phrase whose implied subject is not the subject of the clause it attaches to, so the sentence describes the wrong thing — 'walking to the station, the rain started'.
Walking to the station, the rain started. The phrase describes whoever was walking; the sentence supplies the rain. English attaches an opening modifier to the first subject it meets, so the rain is now on foot.
The error is easy to miss in your own draft because you know who is walking. The reader does not, and the joke arrives before the meaning does. A few more:
- Badly cracked, he replaced the windscreen.
- After three weeks in the archive, the letter finally turned up.
- To qualify for the grant, the forms must be filed by March.
Three repairs, in order of preference.
- Change the subject of the main clause so it matches: Walking to the station, I was caught by the rain.
- Make the modifier a full clause, so it names its own subject: As I walked to the station, the rain started.
- Use an absolute phrase, which carries its own subject and cannot dangle: The rain started, my coat still over my arm.
Most danglers are participial phrases in the opening position, so that is where to look first. A useful line edit habit: on any sentence beginning with an -ing or -ed phrase, read only the phrase and the next two words. If those two words are not the thing the phrase describes, it dangles.