$max = ($#a >= $#s)? $#a: $#s;
for (0..($max - 1)){
 if ($s[$_] == $a[$_]){
  print "○$s[$_]";
 }else{
  print "×$s[$_]";
 }
}

これで動くかな。。。

↓こっちの方がいいよ
http://pc.2ch.net/php/