gives "0000000100011" binarymy @z = unpack ("B11 B13", $buf);
I performed this operation by binary mathematics, but I can't use this as a solution because it is not flexible. I need a general solution, that will allow flexibility of choosing different offsets and field width easily. (In general I am parsing a bit aligned structure...) Thanks!
In reply to accessing bits in a file by andreyb051
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |