#!/usr/bin/rubyrequire 'cgi'cgi = CGI.newtext = cgi['text']puts cgi.headerputs "#{text.reverse}"You could test this CGI script by passing the text directly within the URL, such as with http://www.example.com/test.cgi?text=this+is+a+test.