Below is the file 'twiddle.pl' from this revision. You can also download the file.
#!/usr/pkg/bin/perl binmode STDIN; binmode STDOUT; while (1) { my $byte = getc; last unless defined($byte); $byte = ord($byte); $a = $byte & 0x08; $b = $byte & 0x10; $byte = $byte & 0xe7; $byte = $byte | 0x08 if ($b); $byte = $byte | 0x10 if ($a); printf "%c", $byte; }