For me (and I probably should have made this clearer in my prior), your "nearly-but-not-quite code solution
" is crucial... and much to be desired! It's a key distinguising difference between teaching how to learn (in the precise manner you discuss) and a complete solution (the site is also littered with these) which -- I fear -- rarely teaches anything other than, perhaps, "Wow, PM's a great place from which to cargo-cult code."
And, yes, a plague on the houses of those who consider noob questions "trivial" or beneath their dignity.
But IMO, and as as educated_foo said earlier, the "tireless scolds" who (in many, but not all cases) remind noobs to demonstrate that they've not asked a question without trying to learn by trying to solve their puzzle, themselves. Agreed, "RTFM" without a link is worthless and discourages those new to the site or to Perl. But a (pleasantly phrased) "RTFM type of reply with a link to the relevant site docs or Perl docs seems to me to be at least as likely to instantiate a teachable moment as almost anything we can do to help.