Perl: the Markov chain saw PerlMonks

### Re^2: (Golf) Tic Tac Toe

by thospel (Hermit)
 on Jun 07, 2004 at 16:17 UTC ( #362033=note: print w/replies, xml ) Need Help??

```s//123
456
789
z147,258,369,159,357/;\$p=O;{/\$p{3}/?die\$p:/\d/?\$p^=O^X:die Tie;/z/;pri
+nt\$`.\$p;1until<>=~/\d/&&s/\$&/\$p/g;redo}
```
```s//123
456
789
z147,258,369,159,357/;\$p=O;{/z/;print\$`,\$p^=O^X;/(.)\1\1/?die\$1:/\d/||
+die Tie;\$?=<>until s/\$?/\$p/g;redo}
```
```s//123
456
789
z147,258,369,159,357/;{/z/;print\$`,\$p=\$p^h?X:O;/(.)\1\1/?die\$1:/\d/||d
+ie Tie;\$?=<>until s/\$?/\$p/g;redo}
```
```s//123
456
789
z147,258,369,159,3570/;\$?=/(.)\1\1/?die\$1:/\d/?<>:die(Tie)while!s/\$?/\$
+p/g||print\$`x/z/,\$p=\$p^h?X:O
```
```s//123
456
7890147,258,369,159,357/;\$?=/(.)\1\1/?die\$1:/\d/?<>:die(Tie)while!s/\$?
+/\$:/g||print\$`x/-/,\$:=\$:^h?X:O
```

Create A New User
Node Status?
node history
Node Type: note [id://362033]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (12)
As of 2018-06-25 16:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
Should cpanminus be part of the standard Perl release?

Results (127 votes). Check out past polls.

Notices?