On Thu, Mar 07, 2002 at 03:07:29PM -0600, Russ Foster wrote:
> Questoin #1: Is there a function or module to convert numbers to/from
> decimal, binary, and hex?
Your question is a little vague. Do you have a number, and want to
represent it in a certain base? Or do you have a string that should
On Mar 7, Russ Foster said:
>Questoin #1: Is there a function or module to convert numbers to/from
>decimal, binary, and hex?
See the documentation for pack(), unpack(), sprintf(), and hex(). That'll
cover pretty much every base (no pun intended).
>Question #2: Is there a function or module to
I'm not sure about XOR, but you can do bitwise OR with one pipe '|', and AND
with one ampersand '&'. Is that what you're asking? As for the
conversions, check out the docs on pack and unpack.
-Original Message-
From: Russ Foster [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002
--- Russ Foster <[EMAIL PROTECTED]> wrote:
> Questoin #1: Is there a function or module to
> convert numbers to/from decimal, binary, and hex?
sprintf format strings can do some of the magic. There
is a hex and oct functions. binary can be done via
pack(), if you've got the cookbook this is th
Russ Foster wrote:
>
> Questoin #1: Is there a function or module to convert numbers to/from
> decimal, binary, and hex?
perldoc -f hex
perldoc -f oct
perldoc -f sprintf
perldoc -f vec
perldoc POSIX # Look for strtol() and strtoul()
> Question #2: Is there a function or module to perform