There's one downside with this approach: many questions that a beginner could answer with his Perl skills are ambiguous and lack context to resolve the ambiguity.
Usually you don't have this problem with "contrived examples", as you call them, and neither with real-world problems. But for beginners it's often hard to judge if a problem can be solved with reasonable effort. Which is why they go back to "contrived" problems.
(I don't want to discourage anybody from answering questions here; I merely think that it's not the best way for the average beginner).