Well technically not my first, but the first ive written from scratch. Its just a simple hello world example. Im going to try to extend it to do more now.
Heres what it currently looks like.
#!/usr/bin/ruby
# first cut of a ruby script
require ‘cgi’
# create a cgi object of type html 4
cgi = CGI.new(“html4”)
cgi.out {
cgi.html {
cgi.body {
cgi.h1 { “Hello Ruby!” }
}
}
}
And here is what it does.