in reply to Re: Re: RE: Tic Tac Chop
in thread Tic Tac Chop

No, you can't, since $m's length is used to stop the looping of the program. It has to have length of 9.
chop($m="XO"x5); # 16 $m="XOXOXOXOX"; # 15 $x="X"."OX"x4; # 14
There's a one character optimization. Oh, and I left out a . from my code (and thus, it shows above in yours) at the $p{7}. It should be $p.{7}.

japhy -- Perl and Regex Hacker