[mplspm]: Need some help with BIG constants

Dave Rolsky autarch at urth.org
Mon Apr 19 19:02:41 CDT 2004


On Mon, 19 Apr 2004, Mark Allen wrote:

> I have a large number which is represented in C as
>
> unsigned char bignum[] = { 0x1f, 0xdd, 0x76, 0x78, 0x8f, 0x7b, 0x28,
> 0xc0,
> 				 0xf9, 0xc7, 0x98, 0x61, 0x20, 0x28,
> 0x58, 0x2a };
>
> What's a good way to represent this in perl?  I'm not super familiar
> with how pack works, but it seems like it might be a good way to handle
> this.
>
> Any ideas?

Math::BigInt and Math::BigFloat are probably the easiest if you need to do
any sort of actual math operations on the number in Perl.


-dave

/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/


--------------------------------------------------
Minneapolis Perl Mongers mailing list

To unsubscribe, send mail to majordomo at pm.org
with "unsubscribe mpls" in the body of the message.



More information about the Mpls-pm mailing list