mirror of
https://github.com/stephenenelson/convert-binhex.git
synced 2024-11-22 02:30:55 +00:00
Applied patch for "#17683: test/hexbin script fails to binmode output FH" from SOMIAN@cpan.org
This commit is contained in:
parent
835670c91b
commit
51be79ca38
@ -43,6 +43,7 @@ foreach $infile (@ARGV) {
|
|||||||
print STDERR "Writing $fname (data fork)\n";
|
print STDERR "Writing $fname (data fork)\n";
|
||||||
printf STDERR "Expecting: %6d bytes\n", $HQX->data_length if $opt_v;
|
printf STDERR "Expecting: %6d bytes\n", $HQX->data_length if $opt_v;
|
||||||
open DATA, ">$fname" or die "open $fname: $!";
|
open DATA, ">$fname" or die "open $fname: $!";
|
||||||
|
binmode DATA;
|
||||||
while ($bytes = $HQX->read_data) {
|
while ($bytes = $HQX->read_data) {
|
||||||
print DATA $bytes;
|
print DATA $bytes;
|
||||||
}
|
}
|
||||||
@ -54,6 +55,7 @@ foreach $infile (@ARGV) {
|
|||||||
print STDERR "Writing $fname (resource fork)\n";
|
print STDERR "Writing $fname (resource fork)\n";
|
||||||
printf STDERR "Expecting: %6d bytes\n", $HQX->resource_length if $opt_v;
|
printf STDERR "Expecting: %6d bytes\n", $HQX->resource_length if $opt_v;
|
||||||
open RESOURCE, ">$fname" or die "open $fname: $!";
|
open RESOURCE, ">$fname" or die "open $fname: $!";
|
||||||
|
binmode RESOURCE;
|
||||||
while ($bytes = $HQX->read_resource) {
|
while ($bytes = $HQX->read_resource) {
|
||||||
print RESOURCE $bytes;
|
print RESOURCE $bytes;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user