in reply to Reading a zipped file
If you're wondering about the buffer size parameter for read(); that has nothing to do with the length of the stream/filehandle you're reading from - it's just an intermediate buffer size.
Generally you do something like:
binmode $fh; my $buff; my $total; while (read($fh,$buff,$max_buffer_size)) { $total .= $buff; # usually, you do something smarter than this... } # now all data is in $total.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reading a zipped file
by MonkPaul (Friar) on Apr 04, 2005 at 15:02 UTC | |
by polettix (Vicar) on Apr 04, 2005 at 15:48 UTC | |
by MonkPaul (Friar) on Apr 04, 2005 at 16:19 UTC | |
by polettix (Vicar) on Apr 04, 2005 at 16:46 UTC |