arnk has asked for the wisdom of the Perl Monks concerning the following question:
The file test.dat contains the following when viewed in hex!/usr/bin/perl -w use strict; use diagnostics; my $file = 'test.dat'; open(FILE, ">:raw", "$file") or die "Could not open $file for writing: + $!\n"; binmode(FILE, ":raw"); my $tmp = 9; my $output = pack( 'C', $tmp ); print FILE $output; close FILE; print "...Created $file\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Binmode problem
by grep (Monsignor) on Jul 12, 2007 at 20:12 UTC | |
|
Re: Binmode problem
by ikegami (Patriarch) on Jul 12, 2007 at 22:26 UTC | |
by arnk (Initiate) on Jul 13, 2007 at 13:58 UTC |