Ruby/CGI/CGI Variables
Материал из Wiki.crossplatform.ru
Accepting CGI Variables
#!/usr/bin/ruby require "cgi" cgi = CGI.new text = cgi["text"] puts cgi.header puts "<html><body>#{text.reverse}</body></html>" You could test this CGI script by passing the text directly within the URL, such as with http://www.example.ru/test.cgi?text=this+is+a+test.