Mega Code Archive
Accepting CGI Variables
#!/usr/bin/ruby
require 'cgi'
cgi = CGI.new
text = cgi['text']
puts cgi.header
puts "#{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.