#!/usr/bin/perl # Display a wbc index of games # Bruno Wolff III # Last revised October 13, 2012 # Use unbuffered output as there are some long delays while doing queries select(STDOUT); $| = 1; $" = ''; use Pg; # Use this to clean stuff extracted from the database for html output sub clean(@) { local $str = "@_"; $str =~ s/&/&/g; $str =~ s/</g; $str =~ s/>/>/g; $str =~ s/"/"/g; return $str; } if ($ENV{REQUEST_METHOD} ne '' && $ENV{REQUEST_METHOD} ne 'GET' && $ENV{REQUEST_METHOD} ne 'HEAD') { print <<"EOF"; content-type: text/html; charset=UTF-8 status: 501 Method not implemented