When Moffat writes a new script and delivers it on Doctor Who—we know from whom it comes, but who has to memorize it first?
Who [THINK: Subject performs actions | Doctor Who]
Whom [THINK: Object acted on | movie (M)]
“Who is a subjective-case pronoun, meaning it functions as a subject in a sentence…”
“Who, like I, he, she, and they, performs actions, as in Who rescued the dog? (who is doing the rescuing in this sentence).”
“…whom is an objective-case pronoun, meaning it functions as an object in a sentence.”
Whom, like me, him, her, and them, is acted on, as in Whom did you see? (whom is being seen here, not doing the seeing). Whom more commonly appears when it follows a preposition, as in the salutation To Whom it may concern (Does it concern he? No. Does it concern him? Yes.) or in the title of Ernest Hemingway’s 1940 novel For Whom the Bell Tolls.”
[read more about it on blog.dictionary.com]