in reply to RE: RE: RE: Tic tac toe
in thread Tic tac toe

BigJoe is right, the part of the code that checks for a horizontal match is incorrect. Right after the for loop, where it says:
s/$P{3}/$&/;
it should say something like:
s/($P.?)$&/;

Very nice code! :) I like the way that $& is used.