in reply to writing binary data in perl


To write binary data like this you should use pack:
#!/usr/bin/perl -w use strict; open( FH, ">junk.dat" ) or die "dang it!\n"; binmode FH; my $num = pack 'V',1234; print FH $num; close FH;

If the program is going to be run on Windows as well you should also binmode the filehandle as shown above.

--
John.