in reply to First Script

You can use simple if, elsif and else. To get ASCII character see, ord function. To print in reverse order, see chr function.