mnj200g has asked for the wisdom of the Perl Monks concerning the following question:
I've seen the article with the following code:
$gifname = "picture.gif"; open(GIF, $gifname) or die "can't open $gifname: $!"; binmode(GIF); # now DOS won't mangle binary input from G +IF binmode(STDOUT); # now DOS won't mangle binary output to ST +DOUT while (read(GIF, $buff, 8 * 2**10)) { print STDOUT $buff; }
What is the "8 * 2**10" doing?
I am working with SunOS 5.8 if that matters.
Thanks.
mnj200g
Edit: g0n - code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need Help: PERL and Binary Data
by GrandFather (Saint) on Dec 06, 2006 at 02:16 UTC | |
|
Re: Need Help: PERL and Binary Data
by Util (Priest) on Dec 06, 2006 at 09:01 UTC | |
|
Re: Need Help: PERL and Binary Data
by grep (Monsignor) on Dec 06, 2006 at 02:14 UTC | |
|
Re: Need Help: PERL and Binary Data
by Popcorn Dave (Abbot) on Dec 06, 2006 at 04:24 UTC |