in reply to accessing bits in a file
my $buf = "\x47\x69\x01"; print substr(unpack("B*", $buf), 11, 13); # 0100100000001 [download]