[EMAIL PROTECTED] wrote: > >>You should be able to use pack just fine on them: > > # code sample... > > $Bill, your code sample looks like it ought to do the trick, THANKS!. > I'm confused, though. The perldoc for pack says, in its "rules" section, > that "[i]f the length of the input string is not exactly divisible by 8, > the remainder is packed as if the input string were padded by null bytes > at the end."
I believe you're talking about the b/B types (bit string). I used the C type (unsigned char [bytes]). I think you'll find that the binary type is always a multiple of 8 bits (bytes). > Now, this is just fine, I guess--REG_BINARY values seem to > allow variable lengths. However, this same rule goes on to say that > "...during unpack()ing the 'extra' bytes are ignored." Extra 'bits' are ignored for bit strings. > That's what's got me worried. I mean, if they're just null pads, then > who cares, right? But, what if those extra bytes contain data? > > Or am I misunderstanding something, here? Yes. ;) _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
