Be kind to newbies, answer them accurately, don’t confuse them and try to use Perl that is as simple and non-idiomatic as possible (e.g: for the file’s lowercasing example, don’t use Tie::File, and prefer lc() over tr///).
If you don’t have the time to write the entire code for the beginner - politely tell him you can’t help him at this point or whenever. Else, try to actually write some code which would be as clear and commented as possible. Don’t expect beginners to like Perl Golf snippets. They may mistake them for line noise. ;-)