in reply to output binary data

Just to add a little "decoration" to roboticus' answer :) - you might also want to display a string representation of what you're saving, i.e.

printf STDERR "0x%08x\n", $integer;
-- 
Education is not the filling of a pail, but the lighting of a fire.
 -- W. B. Yeats

Replies are listed 'Best First'.
Re^2: output binary data
by Allasso (Monk) on Dec 29, 2010 at 12:30 UTC

    thanks for the usual great help, dear monks.

    I don't think binmode is necessary on a unix machine.

    Now maybe someone can tell me how I reply to my original post, without branching off someone else's...

    BTW, that "three two" was supposed to be "two four" :-)

      Allasso:

      While it's true that binmode isn't required on a unix box, nowhere in the OP did you mention unix. Using binmode can help portability, so I mentioned because you (or a reader solving a similar problem) might have been using Windows or other OS that may need it.

      As for replying to your own node, I see that the "Comment on" link is below the update section, so I imagine that you'd just click it as for any other node. (Not intending to be snarky, I almost missed it when I looked for it too. I was expecting it to be above the update stuff.)

      ...roboticus

      When your only tool is a hammer, all problems look like your thumb.