Double Parity Vertical Redundancy Check by vandread

for(<>){$x=$r=0;chomp;for(split''){$r+=$f[$"][$x]=$_;$c[$x++]+=$_}$t=$"if$r%2;$"++}for(0..$"*2){$f[$t][$_]^=1if$c[$_]%2}print@{$f[$_]},"\n"for 0..$"-1

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page