in reply to Re: Binary Challenge
in thread Binary Challenge
When you write while(<IMAGE>)... you will read in a chunk of image until you get to the binary for a newline char 00001010. Thus you will read in random length chunks of data. You should really use read(). You should also consider binmode which is essential on Win32 and harmless on *nix.
open IMG, $image or die $!; binmode IMG; binmode STDOUT; my $buffer; while (read(IMG, $buffer, 1024)) { print $buffer; # etc }
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
---|