minimal implementation of connect 4 in Perl