On Tue, Jul 10, 2001 at 07:27:04PM -0700, Erik W wrote:
> Thanks a lot, then what << means?
>From perldoc perlop...
Binary "<<" returns the value of its left argument shifted left
by the number of bits specified by the right argument.
Arguments should be integers. (See also the Integer Arithmetic
entry elsewhere in this document.)
A left shift of n bits is the same as multiplying by 2 n times, and a
right shift is the same as dividing by 2 n times. Sometimes it's
easier to think of the bits as moving to the left or right than to
think of multiplying or dividing by powers of 2, but they're really
the same operation.
> $$<<15 ???
This shifts the value of $$ 15 bits to the left, which is the same as
multiplying $$ by 2**15.
> perl is really unreadable!
Actually bit manipulation is pretty basic computer science. Perl
borrowed the operators from C.
Walt