in reply to -ve XP, node reputation, voting and learning

First a disclaimer: I haven't --'d the node in question.

My guess as to why the node was downvoted would be that there was code and no context.

Looking at the code and your two results the first thought that sprang to my mind was "it's working as coded" missed a "$" in your assignment to the scalar "$txt" meaning that it would always be "cmd 12 arg2", no matter what the value of $arg2, because "$arg2" is never interpolated in that assignment.