for(1..<>){ @a=glob<>; @b=glob<>; $x=glob<>; $y={WA=>1,TLE=>2,MLE=>3,OLE=>4,RE=>5}->{$x}; $z=Yes; for(1..5){ $z=No if $_==$y?$a[$_]:$b[$_]; } print $z,$/; }