Jay Savage wrote: > > Treats the string in EXPR as a bit vector made up of elements of width > BITS, and returns the value of the element specified by OFFSET as an > unsigned integer. > > You might also want to keep in mind that the BITS must be a power of 1
It must be a power of 2. > from one to 32, and that vec() is lvaluable, but you don't need to > know that to look at the code here. > > vec( $address, 7, 1 ) > > sayas "break up the string $address into chunks of one bit, and return > the seventh chunk". Then it looks at the 6th chunk and the 5th chunk. It is zero based so that is "the eighth chunk" followed by the 7th chunk and the 6th chunk. > The sneaky part was stringing all those tertiary "hook" operators > together; that's probably the confusing part. John, or whoever wrote > the code, Guilty. [snip] > Why this works has to do with the way different classes of networks > are assigned, and the way struct in_addr is defined in socket.h. For > more information on the various standard ways hostnames and inet > address are assigned and described, pick up a book on tcp/ip. Or read: ftp://ftp.rfc-editor.org/in-notes/rfc1166.txt and ftp://ftp.rfc-editor.org/in-notes/rfc1918.txt Although classes have been mostly superseded by Classless Inter-Domain Routing ftp://ftp.rfc-editor.org/in-notes/rfc1517.txt ftp://ftp.rfc-editor.org/in-notes/rfc1518.txt ftp://ftp.rfc-editor.org/in-notes/rfc1519.txt ftp://ftp.rfc-editor.org/in-notes/rfc1520.txt John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>