Hello All,

I try to manipulate bits in perl (this si not easy)
The script below fails when using >> and << operator.
Can someone explain me what's wrong ??? 


$xx=chr(16).chr(17);

print unpack('B*',$xx);                 #print 0001000000010001   - OK
print "\n";
$xx=$xx | (chr(255).chr(1));
print unpack('B*',($xx  ) );    #print 1111111100010001   - OK
#$xx = ($xx << 1);      

print "\n"; ;
print unpack('B*',($xx >> 1 ) );  #print 0010000 - I WOULD LIKE 0111111110001000



Regards,
______________________

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to