Sounds like it did get truncated. The stack at the end was because some operations in the postfix notation got truncated at the end.
I ran the program and outputed the array before the join was performed. The output was 500 or so megs. I suspect I might have hit some limit on string size or other limit. The memory usage on the Windows XP box ran close 1.5 gig for the perl process.
Is there any cleaner way to do this that will not greatly impact performance? (The join cut the time to 1/60th over string appending.)
Or is there a nice package to "page" to file parts of an array before the memory limit is hit?