here's a way to pad to 32 bits: sub _pad32 { substr("0" x 32 . shift, -32); }
which is used in Image::Size in the following manner: # _bin2int - converts binary string to decimal sub _bin2int {unpack("N",pack("B32",substr("0"x32.shift,-32)));} >>>Schoeneman, Carl 09/26/01 08:40pm >>> Is there a way to pad a number with leading zeros with 1 command rather than the 2 I used below? It looks like you're supposed to be able to zero-fill with sprintf but I couldn't figure it out. _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]