or download this
#!perl -lw
$x = "\x55\xAA\x55\xAA";;
substr( $x, $_, 1 ) = chr( ord( substr( $x, $_, 1 )) << 1 ) for 0 .. 3
+;;
...
Character in 'b' format wrapped in unpack at - line 7.
Character in 'b' format wrapped in unpack at - line 7.
01010101001010100101010100101010