Keep It Simple, Stupid | |
PerlMonks |
Re: Creating a binary file problemby Eliya (Vicar) |
on Apr 05, 2012 at 17:22 UTC ( [id://963718]=note: print w/replies, xml ) | Need Help?? |
It's not entirely clear to me what exactly you want to be written to the file, but in case you want to print the values expressed in the hex strings (such as "0x0000001b") as binary values to the file, you could say
This would also work for values larger than a Perl number could hold. In the example above, it would write 4 bytes / 32 bits. On a side note, don't use printf, unless you actually specify a format string.
In Section
Seekers of Perl Wisdom
|
|