Why was this question closed as "off topic"?
I see that there are some issues with this post, e.g. the formatting (Anthon reviewed/edited it, not correctly through), grammar/capitalization.
But otherwise it looks like a valid question to me. It is neither too localized, although the OP tagged it as router and said that he uses it on his router, but this is not relevant for this question.
It is also a programming question (How to accomplish a certain task in a specific programming language).
The code is valid and works everywhere with a ping
command and Tcl without the '
(the OP used them to mark code, which was not edited out).
So why was this question considered to be "off topic"?