in reply to How to process each byte in a binary file?
Regardless of the method you choose it would probably be best to read and process the file in chunks. Playing around with the buffer size might lead to an optimization between the size of the read and size of the data to process:
#!/usr/bin/perl -w use strict; open FILE, 'reload.xls' or die "Error message here: $!"; binmode FILE; # as required my $buffer = 4096; my $str; while (read FILE, $str, $buffer) { for (split //, $str, $buffer) { # Your code here } }
--
John.
|
|---|