in reply to Re: Suggestions for optimizing this code...
in thread Suggestions for optimizing this code...

Using your code above as is with the exceptions of adding a shebang line and using $ARGV[0] for the filename and it crunches with

P:\test>523624-a 1000000.dat syswrite() on closed filehandle $fh at P:\test\523624-a.pl line 26. Bad file descriptor at P:\test\523624-a.pl line 26.

Which I do not understand at all. Any thoughts?

Update: Ok. I couldn't see it for looking, but you have a comma instead of a semicolon on the syswrite line.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.