sub nBitsAt{ my( $n, $offset, $bits ) = @_; return unpack "x[A$offset] A$n", unpack "B*", $bits; } print nBitsAt( 13, 11, "\x47\x69\x01" );; 0100100000001
In reply to Re: accessing bits in a file
by BrowserUk
in thread accessing bits in a file
by andreyb051
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |