>>716 Perl5、5で止まる。>>720>>721の解釈違い?それともオレのBug?

%s = qw(. 0 * 1);
@a = map{$s{$_}} split '', '.*...**.*.***..';
$t = 1;
%h = ("@a" => $t);
printf "%2d: @a\n", $t;
for ($t = 2; $t <= 100; $t++) {
 @b=($a[1] ? $a[0] : 0,
   (map{
    ($a[$_-1] xor $a[$_+1]) ? $a[$_] :
     (($a[$_-1] and $a[$_+1]) ? ($a[$_]?0:1) : 0)
   } 1..$#a-1),
   $a[-2] ? $a[-1] : 0
   );
 printf "%2d: @b\n", $t;
 @a = @b;
 $t--, last if exists $h{"@a"};
 $h{"@a"} = $t;
}
@c = map{$_ ? '*' : '.'} @a;
printf "%d => @c\n", $t;

実行結果
~ $ perl 14_716.pl
1: 0 1 0 0 0 1 1 0 1 0 1 1 1 0 0
2: 0 0 0 0 0 1 1 1 0 1 1 0 1 0 0
3: 0 0 0 0 0 1 0 1 1 1 1 1 0 0 0
4: 0 0 0 0 0 0 1 1 0 0 0 1 0 0 0
5: 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0
6: 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0
5 => . . . . . . * * . . . . . . .