In reply to Tye's comments...
I appreciate the in-depth commentary. This is where I'm
going to learn some real perl.
To give some background that might clear up why I wrote
the code the way I did: I'm running perl on a Win98 system.
I'm writing a piece of code that accepts a collection of
text files from a legacy database along with a configuration
file and generates a series of reports in MS Excel.
The text files are comma-delimited and in a specific, reliable
format (for example, no '\n' at the end of file), allowing for
some of the assumptions I made. I tested the code above
on several of these files and achieved the correct results each
time.
The reports are extremely time-sensitive, and routinely sum to
over 40MB of data. I need the routines to be fast and quick -
although I take to heart Tye's comment that fast code is less
important than correct code.
One question I still have: what effect does
have
on the data? In WinBlows it looks as though I still end up
with text in my final array, regardless of whether I use binmode.
In that case, switching to binmode and gaining the speed
increase seems reasonable.
Thanks.