Front page | perl.beginners |
Postings from September 2009
RE: decimal to binary?
Thread Previous
|
Thread Next
From:
Bob McConnell
Date:
September 23, 2009 12:05
Subject:
RE: decimal to binary?
Message ID:
FF8482A96323694490C194BABEAC24A004EB4AFB@Email.cbord.com
From: Bryan R Harris
>
> I need to convert a number like this: -3205.0569059
> ... into an 8-byte double (big and little endian), e.g. 4f 3e 52 00 2a
bc 93
> d3 (I just made up those 8 byte values).
>
> Is this easy in perl? Are long and short ints easy as well?
The sprintf() family is your friend.
Bob McConnell
Thread Previous
|
Thread Next