I would not have down-voted your answer but I would never upvote "that kind of thing" either. Here's why...
Having participated in a lot of different tech and programming related forums over the years, it seems to me that stack exchange has a degree of formality that makes it distinct, in keeping with the goal of producing canonical answers to canonical questions. I am not saying this is better or worse than other forums where more discussion is encouraged, etc. It is just different, it is what people expect here -- and if your experience can be taken as evidence of such, it is what people want.
Part of what makes this different from normative forums is that there is more of an explicit focus on reducing repetition. The ideal question is one which is precise but free from irrelevant details; if you can phrase your question properly, you are more likely to find the same question if it has been asked before, or if it has not and you do post it, someone else is more likely to find it later, and since the answers move up and down according to how they been rated, the idea is that the best answer will rise to the top.
That is in contrast to "normative forums" where a thread is ordered in time and it is considered bad usage to start posting answers to questions you find from two weeks ago. Forums like that are more casual and a greater range of discussion is appreciated.
So, looking at the question, your answer, and the answer that was upvoted and selected, I would say this is the *nix exchange and you should understand the difference between the standard shell based *nix toolkit, which includes sed and fold, and the use of various turing complete (=hefty) language interpreters such as ruby. When I see a lot of questions involving sed and awk, my first thought is always how I would do this -- inevitably, perl -- but the fact that my knowledge of perl has made me disinterested in learning a lot of awk does not make it appropriate for me to say, essentially, "You are wasting your time, just learn perl", because, and this is the major problem with your answer, then I might as well just do the same thing for almost every question (also, see NOTE).
Guess what would happen then? We'd have 17 people suggesting "how you can do this with python", 10 for ruby, 12 for perl, 15 for php, 3 for lisp -- it goes on and on. Why not in java? Erlang? Fortran? This could make for some interesting discussion, no doubt...but it is not a discussion forum. So while I wouldn't personally downvote your answer (it is well written and informative -- but still off topic), I do, I think, understand why people would: because they do not want to see the exchange turn into a cacophony of "alternatives". They want canonical answers to canonical questions.
And when I find one in my hour of need, I am very very very glad for it!
NOTE: It also does not mean that my programmer hack solution to sys admin issues is a really "quality" solution even if it does "work for me to do that". It works for me because I know perl, so I use perl. But I know when I'm doing it that it's a hack, and partially about sparing myself having to learn the proper (ie, canonical) way, which would be more universal and more flexible in the context of a *nix shell. The later is what people most want to find in their hour of need.
sed
way but want theawk
because they're learning... sometimes it's because they think they know what they want and aren't wording it in a way to ask for multiple answers. Sometimes they have constraints which prohibit too many options. Sometimes Perl and Python are overkill.