On 3/27/06, Chad Perrin <[EMAIL PROTECTED]> wrote:
> On Mon, Mar 27, 2006 at 04:17:41PM -0800, John W. Krahn wrote:
> > Jay Savage wrote:
> > >
> > > You might also want to keep in mind that the BITS must be a power of 1
> >
> > It must be a power of 2.
>
> . . . and thus a power of 10.
>
> Ahem.
> Jay Savage wrote:
> >
>
> >
> > 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 )
> >
On Mon, Mar 27, 2006 at 04:17:41PM -0800, John W. Krahn wrote:
> Jay Savage wrote:
> >
> > You might also want to keep in mind that the BITS must be a power of 1
>
> It must be a power of 2.
. . . and thus a power of 10.
Ahem.
--
Chad Perrin [ CCD CopyWrite | http://ccd.apotheon.org ]
This si
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
On 3/27/06, Jim <[EMAIL PROTECTED]> wrote:
>
> >
> > > I am trying to understand how vec() is works in the code below
> >
> > Have you seen the documentation in the perlfunc manpage?
> >
> > perldoc -f vec
> >
> > If you still have questions, after seeing the docs, please ask again.
> > Hope th
>
> > I am trying to understand how vec() is works in the code below
>
> Have you seen the documentation in the perlfunc manpage?
>
> perldoc -f vec
>
> If you still have questions, after seeing the docs, please ask again.
> Hope this helps!
>
Yes, I have read it already. Thanks
--
T
On 3/26/06, Jim <[EMAIL PROTECTED]> wrote:
> I am trying to understand how vec() is works in the code below
Have you seen the documentation in the perlfunc manpage?
perldoc -f vec
If you still have questions, after seeing the docs, please ask again.
Hope this helps!
--Tom Phoenix
Stoneheng
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 t