
davorg
Thaumaturge
/ Moderator
Nov 19, 2003, 2:25 AM
Post #2 of 4
(288 views)
|
|
Re: [GoldenBoy] Using bin mode
[In reply to]
|
Can't Post
|
|
There's no need to use PerlIO there. It's not adding anything useful. You're getting the value "GLOB(0x224eec)" because you're printing the value of a filehandle. That's not a very useful thing to to. Generally it's a better idea to read data from a filehandle.
open FILE, "<sob19.exe" or die $!; binmode FILE; my $buffer; while (my $size = read FILE, $buffer, 1024) { # Now $buffer contains $size bytes of data # (where size <= 1024) from FILE. # Do what you want with it } -- Dave Cross, Perl Hacker, Trainer and Writer http://www.dave.org.uk/ Get more help at Perl Monks
|