Skip to content

Instantly share code, notes, and snippets.

@windytan
Created Feb 10, 2013
Embed
What would you like to do?
$prevbit = 0;
$n=0;
for (qx!cat ddtaa.asc!) {
chomp($a = $_);
if ($n >= 2300) {
if (($n - 2300) % 80 == 0) {
$bit = ($a > 0) ? 1 : 0;
print (($bit != $prevbit) ? "1" : "0");
$prevbit = $bit;
}
}
$n ++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment