All pastes #568373 Raw Edit

Untitled

public text v1 · immutable
·published 2007-06-15 14:23 UTC
rendered paste body
while(<>){chomp;$l=length;push @d,[split //]}
$r = scalar @d;
for($y=0;$y<$r;$y++){
 for($x=0;$x<$l;$x+=2){
  $c=0;
  for($i=-2;$i<4;$i+=2){
   for($j=-1;$j<2;$j++){
    next if ($y+$j>scalar @d or $x+$i>$l);
    next if ($y+$j<0 or $x+$i<0);
    $c++ if ($d[$y+$j][$x+$i] eq '*');
   }
  }
 print $x/2, ",$y\n" if $c!=$d[$y][$x] and $d[$y][$x] ne '*';
 }
}