Clear questions and runnable code
get the best and fastest answer
That only is a solution if you disallow anonymous posting (and even then it can still be thwarted by creating a new throw-away account every so often).
As to the broader questions, not just this particular proposal...
The more voluminous of the latest batches of trolling has been announced as a Holiday special that will likely end as the author's pathetic life again becomes busy enough to direct their loathing to less childish activities, as it had done for quite a while prior to the holidays.
IMHO, if there hadn't been an avalanche of people willing to devote so much attention, the lack of encouragement would have meant a small fraction of the number of nodes before the author would have tired of baiting with little satisfaction in response.
As Petruchio has implied many times, the monks get the level of trolling that they "ask for". So who are the gods to deny the monks from interacting and encouraging what they choose to. For example, there is a local sock puppet that some find to be an egregious troll while some claim to find entertaining.
Then there is the sentiment, that PerlMonks isn't broken (slightly edited): "If you keep making changes in order to deal with increasingly unimportant 'social-issues' you will find yourself on a slippery slope leading down to a totally inwardly facing cabal of sycophants." And we wouldn't want that.
Destructive behavior is usually much simpler than preventing destructive behavior. There are good reasons why the standard wisdom is "Don't feed the trolls" not "Ban the trolls" (which would more honestly be stated as "Try to ban the trolls").
I can certainly sympathize with the desire for the gods or some technical mechanism to save the monks from themselves. And there have been times when such measures have been used, with varied degrees of success.
But when, for example, one of the gods appears to make a personal project of carrying on an extended discussion with "the troll" and there is no shortage of other, high-level monks joining in (even when the subject lines of their replies contain "Do Not Feed the Trolls!!!"!), and an entire army of monks risks losing XP themselves in order to ensure that Worst Nodes is a shrine nearly devoted... Well, it seems beyond presumptuous for other(s) of the gods to interfere, frankly.
The last time I took steps to ban a troll, it worked out fairly well. The troll did return, but it took quite a while. And part of the reason I took those steps then was because people had mostly stopped feeding that troll for some time. The bug spray isn't the first step if you've still got sugar or rotting meat strewn all over the floor. It is best if the motivation to try to figure out how to beat the ban is quite low before trying such. So everybody stop making trolling so darn entertaining first, then extra discouragements can be considered.
Next, we have several people who think they are much too clever for some pathetic old troll and so reply but declare (or simply silently believe) "I am not feeding the troll". No, the troll is not more clever than y'all. Trolling isn't a game of wits. If one has so little of value in their life and so poor of socialization that they commence trolling in earnest, then there is no attention that isn't a reward compared to their pathetic lot. So those who think you aren't giving the type of attention that is desired, wake up!
Then there are the people feeding the troll feeders. I've down-voted a ton of troll fodder and almost always I find that no small number of monks have already up-voted it. So it is no wonder so many keep dishing out the troll chow. And nobody should be shocked that we have so much business at our groaning board.