#!/usr/bin/env ruby # coding: euc-jp require 'cgi' c = CGI.new(:accept_charset => "EUC-JP") print "Content-type: text/html; charset=EUC-JP\n\n" name = c["namae"] bt = c["blood"] print "
" if /ab/i =~ bt print "AB型のあなたはだぶる!\n" elsif /a/i =~ bt print "A型のあなたはえーっすなあ\n" elsif /b/i =~ bt print "B型のあなたはびびっとね\n" elsif /o/i =~ bt print "O型のあなたはおーすげー\n" else print "あなた人間?\n" end print "
\n" print "\n" print "\n"