Hi,
some days ago I faced the time taken by unpack compared to other ways of extracting fields from records.
I think that using substr can speed up the things.
After your posting I took the occasion to learn how to use Benchmark and tested this code below on a 400000-record file:

hi davorg,
sure that warning it's not very nice... :) however I also saw similar difference (about 15%) by running separately the routines and checking with the ps - process status - command.
As I said, I've tried to use Benchmark for the first time (there's always a first time...) for this test. However, I guess it's not a problem of file size that warning.
I'd appreciate, for my learning, if the code would be changed by someone to something that can be bechmarked (if it is not a problem of input file size).
ciao
Roberto

The problem isn't in the size of the file that you're
processing, but rather in the number of times you run the
test. You don't show the code that sets your $count
variable, but you should look at increasing that value.

When putting a smiley right before a closing parenthesis, do you:

Use two parentheses: (Like this: :) )
Use one parenthesis: (Like this: :)
Reverse direction of the smiley: (Like this: (: )
Use angle/square brackets instead of parentheses
Use C-style commenting to set the smiley off from the closing parenthesis
Make the smiley a dunce: (:>
I disapprove of emoticons
Other