CGI interview question

Reverse the string using for loop