From: Ryan Davis Date: 2012-11-29T07:24:09+09:00 Subject: Re: CGI question On Nov 28, 2012, at 03:18 , Jan E. wrote: > CGI scripts are executed by a webserver like Apache. It makes no sense > to run them in the console. not true: 10001 % ruby19 require 'cgi' cgi = CGI.new("html3") # add HTML generation methods cgi.out do cgi.html do cgi.head { "\n"+cgi.title { "This Is a Test"} } + cgi.body do "\n"+ cgi.form do"\n"+ cgi.hr + cgi.h1 { "A Form: " } + "\n"+ cgi.textarea("get_text") +"\n"+ cgi.br + cgi.submit end end end end ^d (offline mode: enter name=value pairs on standard input) ^d Content-Type: text/html Content-Length: 302 This Is a Test

A Form: