Hi
I am trying to understand how vec() is works in the code below
--
my $address = inet_aton( $ARGV[0] ); # ip addr string
...
my $class = vec( $address, 7, 1 ) ?
vec( $address, 6, 1 ) ?
vec( $address, 5, 1 ) ? 'D' : 'C' : 'B' : 'A';
--
I understand that it is testing the bit string in the first octet of the
ipaddr to determine it's address class but not quit sure how.
I think this code came from John Krahn in response to a post of mine a few
years ago.
Thanks,
Jim
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>