Hi John,
On 5/8/09, John W. Krahn <[email protected]> wrote: [snip] > That is equivalent in C to: > > unsigned char decimal_number = 42; > > Or another way to write that in Perl is: > > my $decimal_number = pack 'C', 42; > > > Once you have created the appropriate strings using pack() then just > print() them. I see; thanks for the explanation. I never used Perl for bits before, so pack/unpack is still new to me. Until now, I just envisioned that everything happens magically behind the scenes for me. :-) At this moment, I got it to work by not opening a file for binary output. Instead, I just print () to STDOUT. It seems specifying whether the output file is binary or now doesn't matter? I thought it would... Thanks again! Ray -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
