On Aug 23, Gibbs Tanton - tgibbs said:

>$a4 = $x & 0xFF;
>$a3 = ($x>>8) & 0xFF;
>$a2 = ($x>>16) & 0xFF;
>$a1 = ($x>>24) & 0xFF; 

D'oh, I forgot -- & is faster than %.

  while ($x) {
    unshift @parts, $x & 256;
    $x >>= 8;
  }

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to